home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\CONFIGUR < prev    next >
Text File  |  1994-10-17  |  72KB  |  2,859 lines

  1.  
  2. #!/bin/sh
  3. # From configure.in Revision: 1.40 
  4. #!/bin/sh
  5. # Guess values for system-dependent variables and create Makefiles.
  6. # Generated automatically using autoconf version 1.11 
  7. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  8.  
  9. # This configure script is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU General Public License as published
  11. # by the Free Software Foundation; either version 2, or (at your option)
  12. # any later version.
  13.  
  14. # This script is distributed in the hope that it will be useful, but
  15. # WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  17. # Public License for more details.
  18.  
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, write to the Free Software
  21. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. # Save the original args to write them into config.status later.
  24. configure_args="$*"
  25.  
  26. # Only options that might do something get documented.
  27. ac_usage="Usage: configure [options] [host]
  28. Options: [defaults in brackets after descriptions]
  29. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  30. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  31. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  32. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  33. --help            print this message
  34. --host=HOST        configure for HOST [guessed]
  35. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  36. --quiet, --silent    do not print \`checking for...' messages
  37. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  38. --target=TARGET        configure for TARGET [TARGET=HOST]
  39. --verbose        print results of checks
  40. --version        print the version of autoconf that created configure
  41. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  42. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  43. --x-includes=DIR    X include files are in DIR
  44. --x-libraries=DIR    X library files are in DIR"
  45.  
  46. # Initialize some variables set by options.
  47. # The variables have the same names as the options, with
  48. # dashes changed to underlines.
  49. build=NONE
  50. exec_prefix=
  51. host=NONE
  52. no_create=
  53. nonopt=NONE
  54. norecursion=
  55. prefix=
  56. program_prefix=
  57. program_suffix=
  58. program_transform_name=
  59. silent=
  60. srcdir=
  61. target=NONE
  62. verbose=
  63. x_includes=
  64. x_libraries=
  65.  
  66. ac_prev=
  67. for ac_option
  68. do
  69.  
  70.   # If the previous option needs an argument, assign it.
  71.   if test -n "$ac_prev"; then
  72.     eval "$ac_prev=\$ac_option"
  73.     ac_prev=
  74.     continue
  75.   fi
  76.  
  77.   # Accept (but ignore some of) the important Cygnus configure
  78.   # options, so we can diagnose typos.
  79.  
  80.   case "$ac_option" in
  81.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  82.   *) ac_optarg= ;;
  83.   esac
  84.  
  85.   case "$ac_option" in
  86.  
  87.   -build | --build | --buil | --bui | --bu | --b)
  88.     ac_prev=build ;;
  89.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  90.     build="$ac_optarg" ;;
  91.  
  92.   -disable-* | --disable-*)
  93.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  94.     # Reject names that aren't valid shell variable names.
  95.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  96.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  97.     fi
  98.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  99.     eval "enable_${ac_feature}=no" ;;
  100.  
  101.   -enable-* | --enable-*)
  102.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  103.     # Reject names that aren't valid shell variable names.
  104.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  105.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  106.     fi
  107.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  108.     case "$ac_option" in
  109.       *=*) ;;
  110.       *) ac_optarg=yes ;;
  111.     esac
  112.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  113.  
  114.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  115.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  116.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  117.   | --exec | --exe | --ex)
  118.     ac_prev=exec_prefix ;;
  119.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  120.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  121.   | --exec=* | --exe=* | --ex=*)
  122.     exec_prefix="$ac_optarg" ;;
  123.  
  124.   -gas | --gas | --ga | --g)
  125.     with_gas=yes ;; # Obsolete; use --with-gas.
  126.  
  127.   -help | --help | --hel | --he)
  128.     cat << EOF
  129. $ac_usage
  130. EOF
  131.     exit 0 ;;
  132.  
  133.   -host | --host | --hos | --ho)
  134.     ac_prev=host ;;
  135.   -host=* | --host=* | --hos=* | --ho=*)
  136.     host="$ac_optarg" ;;
  137.  
  138.   -nfp | --nfp | --nf)
  139.     with_fp=no ;; # Obsolete; use --without-fp.
  140.  
  141.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  142.   | --no-cr | --no-c)
  143.     no_create=yes ;;
  144.  
  145.   -norecursion | --norecursion | --norecursio | --norecursi \
  146.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  147.     norecursion=yes ;;
  148.  
  149.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  150.     ac_prev=prefix ;;
  151.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  152.     prefix="$ac_optarg" ;;
  153.  
  154.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  155.   | --program-pre | --program-pr | --program-p)
  156.     ac_prev=program_prefix ;;
  157.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  158.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  159.     program_prefix="$ac_optarg" ;;
  160.  
  161.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  162.   | --program-suf | --program-su | --program-s)
  163.     ac_prev=program_suffix ;;
  164.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  165.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  166.     program_suffix="$ac_optarg" ;;
  167.  
  168.   -program-transform-name | --program-transform-name \
  169.   | --program-transform-nam | --program-transform-na \
  170.   | --program-transform-n | --program-transform- \
  171.   | --program-transform | --program-transfor \
  172.   | --program-transfo | --program-transf \
  173.   | --program-trans | --program-tran \
  174.   | --progr-tra | --program-tr | --program-t)
  175.     ac_prev=program_transform_name ;;
  176.   -program-transform-name=* | --program-transform-name=* \
  177.   | --program-transform-nam=* | --program-transform-na=* \
  178.   | --program-transform-n=* | --program-transform-=* \
  179.   | --program-transform=* | --program-transfor=* \
  180.   | --program-transfo=* | --program-transf=* \
  181.   | --program-trans=* | --program-tran=* \
  182.   | --progr-tra=* | --program-tr=* | --program-t=*)
  183.     program_transform_name="$ac_optarg" ;;
  184.  
  185.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  186.   | -silent | --silent | --silen | --sile | --sil)
  187.     silent=yes ;;
  188.  
  189.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  190.     ac_prev=srcdir ;;
  191.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  192.     srcdir="$ac_optarg" ;;
  193.  
  194.   -target | --target | --targe | --targ | --tar | --ta | --t)
  195.     ac_prev=target ;;
  196.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  197.     target="$ac_optarg" ;;
  198.  
  199.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  200.     verbose=yes ;;
  201.  
  202.   -version | --version | --versio | --versi | --vers)
  203.     echo "configure generated by autoconf version 1.11"
  204.     exit 0 ;;
  205.  
  206.   -with-* | --with-*)
  207.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  208.     # Reject names that aren't valid shell variable names.
  209.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  210.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  211.     fi
  212.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  213.     case "$ac_option" in
  214.       *=*) ;;
  215.       *) ac_optarg=yes ;;
  216.     esac
  217.     eval "with_${ac_package}='$ac_optarg'" ;;
  218.  
  219.   -without-* | --without-*)
  220.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  221.     # Reject names that aren't valid shell variable names.
  222.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  223.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  224.     fi
  225.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  226.     eval "with_${ac_package}=no" ;;
  227.  
  228.   --x) with_x=yes ;; # Obsolete; use --with-x.
  229.  
  230.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  231.   | --x-incl | --x-inc | --x-in | --x-i)
  232.     ac_prev=x_includes ;;
  233.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  234.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  235.     x_includes="$ac_optarg" ;;
  236.  
  237.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  238.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  239.     ac_prev=x_libraries ;;
  240.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  241.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  242.     x_libraries="$ac_optarg" ;;
  243.  
  244.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  245.     ;;
  246.  
  247.   *) 
  248.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  249.       echo "configure: warning: $ac_option: invalid host type" >&2
  250.     fi
  251.     if test "x$nonopt" != xNONE; then
  252.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  253.     fi
  254.     nonopt="$ac_option"
  255.     ;;
  256.  
  257.   esac
  258. done
  259.  
  260. if test -n "$ac_prev"; then
  261.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  262. fi
  263.  
  264. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  265. trap 'rm -fr confdefs* $ac_clean_files' 0
  266.  
  267. # Save the original args if we used an alternate arg parser.
  268. ac_configure_temp="${configure_args-$*}"
  269. # Strip out --no-create and --norecursion so they don't pile up.
  270. configure_args=
  271. for ac_arg in $ac_configure_temp; do
  272.   case "$ac_arg" in
  273.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  274.   | --no-cr | --no-c) ;;
  275.   -norecursion | --norecursion | --norecursio | --norecursi \
  276.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  277.   *) configure_args="$configure_args $ac_arg" ;;
  278.   esac
  279. done
  280.  
  281. # NLS nuisances.
  282. # These must not be set unconditionally because not all systems understand
  283. # e.g. LANG=C (notably SCO).
  284. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  285. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  286.  
  287. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  288. rm -rf conftest* confdefs.h
  289. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  290. echo > confdefs.h
  291.  
  292. # A filename unique to this package, relative to the directory that
  293. # configure is in, which we can look for to find out if srcdir is correct.
  294. ac_unique_file=source/irc.c
  295.  
  296. # Find the source files, if location was not specified.
  297. if test -z "$srcdir"; then
  298.   ac_srcdir_defaulted=yes
  299.   # Try the directory containing this script, then `..'.
  300.   ac_prog=$0
  301.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  302.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  303.   srcdir=$ac_confdir
  304.   if test ! -r $srcdir/$ac_unique_file; then
  305.     srcdir=..
  306.   fi
  307. fi
  308. if test ! -r $srcdir/$ac_unique_file; then
  309.   if test x$ac_srcdir_defaulted = xyes; then
  310.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  311.   else
  312.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  313.   fi
  314. fi
  315. ac_ext=c
  316. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  317. ac_cpp='${CPP}'
  318. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  319.  
  320.  
  321.  
  322.  
  323.  
  324. VERSION=`sed -n -e 's/"$//' -e '/#define IRCII_VERSION    *"/s///p' -e '/#define IRCII_VERSION/q' < source/irc.c` 
  325. echo this is ircii version $VERSION
  326. echo
  327.  
  328.  
  329.  
  330. if test -z "$CC"; then
  331.   # Extract the first word of `gcc', so it can be a program name with args.
  332.   set ac_dummy gcc; ac_word=$2
  333.   test -n "$silent" || echo "checking for $ac_word"
  334.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  335.   for ac_dir in $PATH; do
  336.     test -z "$ac_dir" && ac_dir=.
  337.     if test -f $ac_dir/$ac_word; then
  338.       CC="gcc"
  339.       break
  340.     fi
  341.   done
  342.   IFS="$ac_save_ifs"
  343. fi
  344. test -z "$CC" && CC="cc"
  345. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  346.  
  347. # Find out if we are using GNU C, under whatever name.
  348. cat > conftest.c <<EOF
  349. #ifdef __GNUC__
  350.   yes
  351. #endif
  352. EOF
  353. ${CC-cc} -E conftest.c > conftest.out 2>&1
  354. if egrep yes conftest.out >/dev/null 2>&1; then
  355.   GCC=1 # For later tests.
  356. fi
  357. rm -f conftest*
  358.  
  359. test -n "$silent" || echo "checking how to run the C preprocessor"
  360. if test -z "$CPP"; then
  361.   # This must be in double quotes, not single quotes, because CPP may get
  362.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  363.   # make.  It must be expanded now.
  364.   CPP="${CC-cc} -E"
  365.   cat > conftest.${ac_ext} <<EOF
  366. #include "confdefs.h"
  367. #include <stdio.h>
  368. Syntax Error
  369. EOF
  370. # Some shells (Coherent) do redirections in the wrong order, so need
  371. # the parens.
  372. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  373. if test -z "$ac_err"; then
  374.   :
  375. else
  376.   rm -rf conftest*
  377.   CPP="${CC-cc} -E -traditional-cpp"
  378.   cat > conftest.${ac_ext} <<EOF
  379. #include "confdefs.h"
  380. #include <stdio.h>
  381. Syntax Error
  382. EOF
  383. # Some shells (Coherent) do redirections in the wrong order, so need
  384. # the parens.
  385. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  386. if test -z "$ac_err"; then
  387.   :
  388. else
  389.   rm -rf conftest*
  390.   CPP=/lib/cpp
  391. fi
  392. rm -f conftest*
  393. fi
  394. rm -f conftest*
  395. fi
  396. test -n "$verbose" && echo "    setting CPP to $CPP"
  397.  
  398. test -n "$silent" || echo "checking for POSIXized ISC"
  399. if test -d /etc/conf/kconfig.d &&
  400.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  401. then
  402.   ISC=1 # If later tests want to check for ISC.
  403.   
  404. {
  405. test -n "$verbose" && \
  406. echo "    defining _POSIX_SOURCE"
  407. echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  408. DEFS="$DEFS -D_POSIX_SOURCE=1"
  409. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  410. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  411. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  412. "
  413. }
  414.  
  415.   if test -n "$GCC"; then
  416.     CC="$CC -posix"
  417.   else
  418.     CC="$CC -Xp"
  419.   fi
  420. fi
  421.  
  422. test -n "$silent" || echo "checking for AIX"
  423. cat > conftest.${ac_ext} <<EOF
  424. #include "confdefs.h"
  425. #ifdef _AIX
  426.   yes
  427. #endif
  428.  
  429. EOF
  430. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  431. if egrep "yes" conftest.out >/dev/null 2>&1; then
  432.   rm -rf conftest*
  433.   
  434. {
  435. test -n "$verbose" && \
  436. echo "    defining _ALL_SOURCE"
  437. echo "#define" _ALL_SOURCE "1" >> confdefs.h
  438. DEFS="$DEFS -D_ALL_SOURCE=1"
  439. ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
  440. \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
  441. \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
  442. "
  443. }
  444.  
  445.  
  446. fi
  447. rm -f conftest*
  448.  
  449.  
  450. if test -z "$LEX"; then
  451.   # Extract the first word of `flex', so it can be a program name with args.
  452.   set ac_dummy flex; ac_word=$2
  453.   test -n "$silent" || echo "checking for $ac_word"
  454.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  455.   for ac_dir in $PATH; do
  456.     test -z "$ac_dir" && ac_dir=.
  457.     if test -f $ac_dir/$ac_word; then
  458.       LEX="flex"
  459.       break
  460.     fi
  461.   done
  462.   IFS="$ac_save_ifs"
  463. fi
  464. test -z "$LEX" && LEX="lex"
  465. test -n "$LEX" && test -n "$verbose" && echo "    setting LEX to $LEX"
  466.  
  467. if test -z "$LEXLIB"
  468. then
  469.   case "$LEX" in
  470.   flex*) ac_save_LIBS="${LIBS}"
  471. LIBS="${LIBS} -lfl"
  472. ac_have_lib=""
  473. test -n "$silent" || echo "checking for -lfl"
  474. cat > conftest.${ac_ext} <<EOF
  475. #include "confdefs.h"
  476.  
  477. int main() { return 0; }
  478. int t() { main();; return 0; }
  479. EOF
  480. if eval $ac_compile; then
  481.   rm -rf conftest*
  482.   ac_have_lib="1"
  483.  
  484. fi
  485. rm -f conftest*
  486. LIBS="${ac_save_LIBS}"
  487. if test -n "${ac_have_lib}"; then
  488.    :; LEXLIB="-lfl"
  489. else
  490.    :; 
  491. fi
  492.  ;;
  493.   *) LEXLIB="-ll" ;;
  494.   esac
  495. fi
  496. test -n "$verbose" && echo "    setting LEXLIB to $LEXLIB"
  497.  
  498. if test -n "$GCC"; then
  499.   test -n "$silent" || echo "checking whether -traditional is needed"
  500.   ac_pattern="Autoconf.*'x'"
  501.   ac_prog='#include <sgtty.h>
  502. Autoconf TIOCGETP'
  503.   cat > conftest.${ac_ext} <<EOF
  504. #include "confdefs.h"
  505. $ac_prog
  506. EOF
  507. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  508. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  509.   rm -rf conftest*
  510.   ac_need_trad=1
  511.  
  512. fi
  513. rm -f conftest*
  514.  
  515.  
  516.   if test -z "$ac_need_trad"; then
  517.     ac_prog='#include <termio.h>
  518. Autoconf TCGETA'
  519.     cat > conftest.${ac_ext} <<EOF
  520. #include "confdefs.h"
  521. $ac_prog
  522. EOF
  523. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  524. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  525.   rm -rf conftest*
  526.   ac_need_trad=1
  527.  
  528. fi
  529. rm -f conftest*
  530.  
  531.   fi
  532.   test -n "$ac_need_trad" && CC="$CC -traditional"
  533. fi
  534.  
  535. ac_save_LIBS="${LIBS}"
  536. LIBS="${LIBS} -lsun"
  537. ac_have_lib=""
  538. test -n "$silent" || echo "checking for -lsun"
  539. cat > conftest.${ac_ext} <<EOF
  540. #include "confdefs.h"
  541.  
  542. int main() { return 0; }
  543. int t() { main();; return 0; }
  544. EOF
  545. if eval $ac_compile; then
  546.   rm -rf conftest*
  547.   ac_have_lib="1"
  548.  
  549. fi
  550. rm -f conftest*
  551. LIBS="${ac_save_LIBS}"
  552. if test -n "${ac_have_lib}"; then
  553.    :; LIBS="$LIBS -lsun"
  554. else
  555.    :; 
  556. fi
  557.  
  558.  
  559.  
  560. case "$DEFS" in
  561.   *-D_ALL_SOURCE*)
  562.     aix=1
  563.     ;;
  564. esac
  565.  
  566. echo checking for qnx
  567. case "$(uname -s)" in
  568.     QNX*) LDFLAGS=-N64k                            CFLAGS="-w4 -O -g -fi=unix.h"        ;;
  569. esac
  570.  
  571. echo checking for solaris
  572. if /bin/sun 2> /dev/null
  573. then
  574.   uname=`uname -r`
  575.   case "$uname" in
  576.     4.*)
  577.       ;;
  578.     5.*) 
  579. {
  580. test -n "$verbose" && \
  581. echo "    defining __solaris__"
  582. echo "#define" __solaris__ "1" >> confdefs.h
  583. DEFS="$DEFS -D__solaris__=1"
  584. ac_sed_defs="${ac_sed_defs}\${ac_dA}__solaris__\${ac_dB}__solaris__\${ac_dC}1\${ac_dD}
  585. \${ac_uA}__solaris__\${ac_uB}__solaris__\${ac_uC}1\${ac_uD}
  586. \${ac_eA}__solaris__\${ac_eB}__solaris__\${ac_eC}1\${ac_eD}
  587. "
  588. }
  589.  
  590.      
  591. {
  592. test -n "$verbose" && \
  593. echo "    defining SVR4"
  594. echo "#define" SVR4 "1" >> confdefs.h
  595. DEFS="$DEFS -DSVR4=1"
  596. ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD}
  597. \${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD}
  598. \${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD}
  599. "
  600. }
  601.  
  602.       ;;
  603.   esac
  604. fi
  605.  
  606. case "$DEFS" in
  607.   *-DSVR4*)               ;;
  608.   *)
  609.  
  610. echo checking for SVR4
  611. cat > conftest.${ac_ext} <<EOF
  612. #include "confdefs.h"
  613. #if defined(SVR4) || defined(__svr4__)
  614.   yes
  615. #endif
  616.  
  617. EOF
  618. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  619. if egrep "yes" conftest.out >/dev/null 2>&1; then
  620.   rm -rf conftest*
  621.   svr4=1
  622.  
  623. fi
  624. rm -f conftest*
  625.  
  626.     ;;
  627. esac
  628.  
  629. if test -n "$svr4"
  630. then
  631.   LIBS="-L/usr/ccs/lib $LIBS"
  632.   
  633. {
  634. test -n "$verbose" && \
  635. echo "    defining SVR4"
  636. echo "#define" SVR4 "1" >> confdefs.h
  637. DEFS="$DEFS -DSVR4=1"
  638. ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD}
  639. \${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD}
  640. \${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD}
  641. "
  642. }
  643.  
  644. fi
  645.  
  646.  
  647. echo checking for -I/usr/netinclude
  648. if test -d /usr/netinclude; then
  649.   CFLAGS="$CFLAGS -I/usr/netinclude"
  650. fi
  651.   
  652. for ac_hdr in sys/un.h sys/select.h sys/fcntl.h sys/file.h sys/time.h sys/wait.h sys/twg_config.h sys/ptem.h
  653. do
  654. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  655. test -n "$silent" || echo "checking for ${ac_hdr}"
  656. cat > conftest.${ac_ext} <<EOF
  657. #include "confdefs.h"
  658. #include <${ac_hdr}>
  659. EOF
  660. # Some shells (Coherent) do redirections in the wrong order, so need
  661. # the parens.
  662. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  663. if test -z "$ac_err"; then
  664.   rm -rf conftest*
  665.   
  666. {
  667. test -n "$verbose" && \
  668. echo "    defining ${ac_tr_hdr}"
  669. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  670. DEFS="$DEFS -D${ac_tr_hdr}=1"
  671. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  672. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  673. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  674. "
  675. }
  676.  
  677.  
  678. fi
  679. rm -f conftest*
  680. done
  681. for ac_hdr in stdarg.h unistd.h fcntl.h string.h memory.h netdb.h limits.h
  682. do
  683. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  684. test -n "$silent" || echo "checking for ${ac_hdr}"
  685. cat > conftest.${ac_ext} <<EOF
  686. #include "confdefs.h"
  687. #include <${ac_hdr}>
  688. EOF
  689. # Some shells (Coherent) do redirections in the wrong order, so need
  690. # the parens.
  691. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  692. if test -z "$ac_err"; then
  693.   rm -rf conftest*
  694.   
  695. {
  696. test -n "$verbose" && \
  697. echo "    defining ${ac_tr_hdr}"
  698. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  699. DEFS="$DEFS -D${ac_tr_hdr}=1"
  700. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  701. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  702. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  703. "
  704. }
  705.  
  706.  
  707. fi
  708. rm -f conftest*
  709. done
  710. test -n "$silent" || echo "checking for setsid"
  711. cat > conftest.${ac_ext} <<EOF
  712. #include "confdefs.h"
  713. #include <ctype.h>
  714. int main() { return 0; }
  715. int t() { 
  716. /* The GNU C library defines this for functions which it implements
  717.     to always fail with ENOSYS.  Some functions are actually named
  718.     something starting with __ and the normal name is an alias.  */
  719. #if defined (__stub_setsid) || defined (__stub___setsid)
  720. choke me
  721. #else
  722. /* Override any gcc2 internal prototype to avoid an error.  */
  723. extern char setsid(); setsid();
  724. #endif
  725. ; return 0; }
  726. EOF
  727. if eval $ac_compile; then
  728.   rm -rf conftest*
  729.   {
  730. test -n "$verbose" && \
  731. echo "    defining HAVE_SETSID"
  732. echo "#define" HAVE_SETSID "1" >> confdefs.h
  733. DEFS="$DEFS -DHAVE_SETSID=1"
  734. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SETSID\${ac_dB}HAVE_SETSID\${ac_dC}1\${ac_dD}
  735. \${ac_uA}HAVE_SETSID\${ac_uB}HAVE_SETSID\${ac_uC}1\${ac_uD}
  736. \${ac_eA}HAVE_SETSID\${ac_eB}HAVE_SETSID\${ac_eC}1\${ac_eD}
  737. "
  738. }
  739.  
  740.  
  741. fi
  742. rm -f conftest*
  743.  
  744. test -n "$silent" || echo "checking for getpgid"
  745. cat > conftest.${ac_ext} <<EOF
  746. #include "confdefs.h"
  747. #include <ctype.h>
  748. int main() { return 0; }
  749. int t() { 
  750. /* The GNU C library defines this for functions which it implements
  751.     to always fail with ENOSYS.  Some functions are actually named
  752.     something starting with __ and the normal name is an alias.  */
  753. #if defined (__stub_getpgid) || defined (__stub___getpgid)
  754. choke me
  755. #else
  756. /* Override any gcc2 internal prototype to avoid an error.  */
  757. extern char getpgid(); getpgid();
  758. #endif
  759. ; return 0; }
  760. EOF
  761. if eval $ac_compile; then
  762.   rm -rf conftest*
  763.   {
  764. test -n "$verbose" && \
  765. echo "    defining HAVE_GETPGID"
  766. echo "#define" HAVE_GETPGID "1" >> confdefs.h
  767. DEFS="$DEFS -DHAVE_GETPGID=1"
  768. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETPGID\${ac_dB}HAVE_GETPGID\${ac_dC}1\${ac_dD}
  769. \${ac_uA}HAVE_GETPGID\${ac_uB}HAVE_GETPGID\${ac_uC}1\${ac_uD}
  770. \${ac_eA}HAVE_GETPGID\${ac_eB}HAVE_GETPGID\${ac_eC}1\${ac_eD}
  771. "
  772. }
  773.  
  774.  
  775. fi
  776. rm -f conftest*
  777.  
  778. test -n "$silent" || echo "checking for getsid"
  779. cat > conftest.${ac_ext} <<EOF
  780. #include "confdefs.h"
  781. #include <ctype.h>
  782. int main() { return 0; }
  783. int t() { 
  784. /* The GNU C library defines this for functions which it implements
  785.     to always fail with ENOSYS.  Some functions are actually named
  786.     something starting with __ and the normal name is an alias.  */
  787. #if defined (__stub_getsid) || defined (__stub___getsid)
  788. choke me
  789. #else
  790. /* Override any gcc2 internal prototype to avoid an error.  */
  791. extern char getsid(); getsid();
  792. #endif
  793. ; return 0; }
  794. EOF
  795. if eval $ac_compile; then
  796.   rm -rf conftest*
  797.   {
  798. test -n "$verbose" && \
  799. echo "    defining HAVE_GETSID"
  800. echo "#define" HAVE_GETSID "1" >> confdefs.h
  801. DEFS="$DEFS -DHAVE_GETSID=1"
  802. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETSID\${ac_dB}HAVE_GETSID\${ac_dC}1\${ac_dD}
  803. \${ac_uA}HAVE_GETSID\${ac_uB}HAVE_GETSID\${ac_uC}1\${ac_uD}
  804. \${ac_eA}HAVE_GETSID\${ac_eB}HAVE_GETSID\${ac_eC}1\${ac_eD}
  805. "
  806. }
  807.  
  808.  
  809. fi
  810. rm -f conftest*
  811.  
  812. test -n "$silent" || echo "checking for scandir"
  813. cat > conftest.${ac_ext} <<EOF
  814. #include "confdefs.h"
  815. #include <ctype.h>
  816. int main() { return 0; }
  817. int t() { 
  818. /* The GNU C library defines this for functions which it implements
  819.     to always fail with ENOSYS.  Some functions are actually named
  820.     something starting with __ and the normal name is an alias.  */
  821. #if defined (__stub_scandir) || defined (__stub___scandir)
  822. choke me
  823. #else
  824. /* Override any gcc2 internal prototype to avoid an error.  */
  825. extern char scandir(); scandir();
  826. #endif
  827. ; return 0; }
  828. EOF
  829. if eval $ac_compile; then
  830.   rm -rf conftest*
  831.   {
  832. test -n "$verbose" && \
  833. echo "    defining HAVE_SCANDIR"
  834. echo "#define" HAVE_SCANDIR "1" >> confdefs.h
  835. DEFS="$DEFS -DHAVE_SCANDIR=1"
  836. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SCANDIR\${ac_dB}HAVE_SCANDIR\${ac_dC}1\${ac_dD}
  837. \${ac_uA}HAVE_SCANDIR\${ac_uB}HAVE_SCANDIR\${ac_uC}1\${ac_uD}
  838. \${ac_eA}HAVE_SCANDIR\${ac_eB}HAVE_SCANDIR\${ac_eC}1\${ac_eD}
  839. "
  840. }
  841.  
  842.  
  843. fi
  844. rm -f conftest*
  845.  
  846. test -n "$silent" || echo "checking for memmove"
  847. cat > conftest.${ac_ext} <<EOF
  848. #include "confdefs.h"
  849. #include <ctype.h>
  850. int main() { return 0; }
  851. int t() { 
  852. /* The GNU C library defines this for functions which it implements
  853.     to always fail with ENOSYS.  Some functions are actually named
  854.     something starting with __ and the normal name is an alias.  */
  855. #if defined (__stub_memmove) || defined (__stub___memmove)
  856. choke me
  857. #else
  858. /* Override any gcc2 internal prototype to avoid an error.  */
  859. extern char memmove(); memmove();
  860. #endif
  861. ; return 0; }
  862. EOF
  863. if eval $ac_compile; then
  864.   rm -rf conftest*
  865.   {
  866. test -n "$verbose" && \
  867. echo "    defining HAVE_MEMMOVE"
  868. echo "#define" HAVE_MEMMOVE "1" >> confdefs.h
  869. DEFS="$DEFS -DHAVE_MEMMOVE=1"
  870. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_MEMMOVE\${ac_dB}HAVE_MEMMOVE\${ac_dC}1\${ac_dD}
  871. \${ac_uA}HAVE_MEMMOVE\${ac_uB}HAVE_MEMMOVE\${ac_uC}1\${ac_uD}
  872. \${ac_eA}HAVE_MEMMOVE\${ac_eB}HAVE_MEMMOVE\${ac_eC}1\${ac_eD}
  873. "
  874. }
  875.  
  876.  
  877. fi
  878. rm -f conftest*
  879.  
  880. test -n "$silent" || echo "checking for uname"
  881. cat > conftest.${ac_ext} <<EOF
  882. #include "confdefs.h"
  883. #include <ctype.h>
  884. int main() { return 0; }
  885. int t() { 
  886. /* The GNU C library defines this for functions which it implements
  887.     to always fail with ENOSYS.  Some functions are actually named
  888.     something starting with __ and the normal name is an alias.  */
  889. #if defined (__stub_uname) || defined (__stub___uname)
  890. choke me
  891. #else
  892. /* Override any gcc2 internal prototype to avoid an error.  */
  893. extern char uname(); uname();
  894. #endif
  895. ; return 0; }
  896. EOF
  897. if eval $ac_compile; then
  898.   rm -rf conftest*
  899.   {
  900. test -n "$verbose" && \
  901. echo "    defining HAVE_UNAME"
  902. echo "#define" HAVE_UNAME "1" >> confdefs.h
  903. DEFS="$DEFS -DHAVE_UNAME=1"
  904. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UNAME\${ac_dB}HAVE_UNAME\${ac_dC}1\${ac_dD}
  905. \${ac_uA}HAVE_UNAME\${ac_uB}HAVE_UNAME\${ac_uC}1\${ac_uD}
  906. \${ac_eA}HAVE_UNAME\${ac_eB}HAVE_UNAME\${ac_eC}1\${ac_eD}
  907. "
  908. }
  909.  
  910.  
  911. else
  912.   rm -rf conftest*
  913.   ac_save_LIBS="${LIBS}"
  914. LIBS="${LIBS} -lposix"
  915. ac_have_lib=""
  916. test -n "$silent" || echo "checking for -lposix"
  917. cat > conftest.${ac_ext} <<EOF
  918. #include "confdefs.h"
  919.  
  920. int main() { return 0; }
  921. int t() { main();; return 0; }
  922. EOF
  923. if eval $ac_compile; then
  924.   rm -rf conftest*
  925.   ac_have_lib="1"
  926.  
  927. fi
  928. rm -f conftest*
  929. LIBS="${ac_save_LIBS}"
  930. if test -n "${ac_have_lib}"; then
  931.    :; oLIBS=$LIBS
  932.   LIBS="$LIBS -lposix"
  933.   test -n "$silent" || echo "checking for uname"
  934. cat > conftest.${ac_ext} <<EOF
  935. #include "confdefs.h"
  936. #include <ctype.h>
  937. int main() { return 0; }
  938. int t() { 
  939. /* The GNU C library defines this for functions which it implements
  940.     to always fail with ENOSYS.  Some functions are actually named
  941.     something starting with __ and the normal name is an alias.  */
  942. #if defined (__stub_uname) || defined (__stub___uname)
  943. choke me
  944. #else
  945. /* Override any gcc2 internal prototype to avoid an error.  */
  946. extern char uname(); uname();
  947. #endif
  948. ; return 0; }
  949. EOF
  950. if eval $ac_compile; then
  951.   rm -rf conftest*
  952.   {
  953. test -n "$verbose" && \
  954. echo "    defining HAVE_UNAME"
  955. echo "#define" HAVE_UNAME "1" >> confdefs.h
  956. DEFS="$DEFS -DHAVE_UNAME=1"
  957. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UNAME\${ac_dB}HAVE_UNAME\${ac_dC}1\${ac_dD}
  958. \${ac_uA}HAVE_UNAME\${ac_uB}HAVE_UNAME\${ac_uC}1\${ac_uD}
  959. \${ac_eA}HAVE_UNAME\${ac_eB}HAVE_UNAME\${ac_eC}1\${ac_eD}
  960. "
  961. }
  962.  
  963.  
  964. else
  965.   rm -rf conftest*
  966.   LIBS=$oLIBS
  967. fi
  968. rm -f conftest*
  969.  
  970. else
  971.    :; 
  972. fi
  973.  
  974. fi
  975. rm -f conftest*
  976.  
  977. test -n "$silent" || echo "checking for getcwd"
  978. cat > conftest.${ac_ext} <<EOF
  979. #include "confdefs.h"
  980. #include <ctype.h>
  981. int main() { return 0; }
  982. int t() { 
  983. /* The GNU C library defines this for functions which it implements
  984.     to always fail with ENOSYS.  Some functions are actually named
  985.     something starting with __ and the normal name is an alias.  */
  986. #if defined (__stub_getcwd) || defined (__stub___getcwd)
  987. choke me
  988. #else
  989. /* Override any gcc2 internal prototype to avoid an error.  */
  990. extern char getcwd(); getcwd();
  991. #endif
  992. ; return 0; }
  993. EOF
  994. if eval $ac_compile; then
  995.   :
  996. else
  997.   rm -rf conftest*
  998.   {
  999. test -n "$verbose" && \
  1000. echo "    defining NEED_GETCWD"
  1001. echo "#define" NEED_GETCWD "1" >> confdefs.h
  1002. DEFS="$DEFS -DNEED_GETCWD=1"
  1003. ac_sed_defs="${ac_sed_defs}\${ac_dA}NEED_GETCWD\${ac_dB}NEED_GETCWD\${ac_dC}1\${ac_dD}
  1004. \${ac_uA}NEED_GETCWD\${ac_uB}NEED_GETCWD\${ac_uC}1\${ac_uD}
  1005. \${ac_eA}NEED_GETCWD\${ac_eB}NEED_GETCWD\${ac_eC}1\${ac_eD}
  1006. "
  1007. }
  1008.  
  1009. fi
  1010. rm -f conftest*
  1011.  
  1012. test -n "$silent" || echo "checking for fchmod"
  1013. cat > conftest.${ac_ext} <<EOF
  1014. #include "confdefs.h"
  1015. #include <ctype.h>
  1016. int main() { return 0; }
  1017. int t() { 
  1018. /* The GNU C library defines this for functions which it implements
  1019.     to always fail with ENOSYS.  Some functions are actually named
  1020.     something starting with __ and the normal name is an alias.  */
  1021. #if defined (__stub_fchmod) || defined (__stub___fchmod)
  1022. choke me
  1023. #else
  1024. /* Override any gcc2 internal prototype to avoid an error.  */
  1025. extern char fchmod(); fchmod();
  1026. #endif
  1027. ; return 0; }
  1028. EOF
  1029. if eval $ac_compile; then
  1030.   :
  1031. else
  1032.   rm -rf conftest*
  1033.   {
  1034. test -n "$verbose" && \
  1035. echo "    defining NEED_FCHMOD"
  1036. echo "#define" NEED_FCHMOD "1" >> confdefs.h
  1037. DEFS="$DEFS -DNEED_FCHMOD=1"
  1038. ac_sed_defs="${ac_sed_defs}\${ac_dA}NEED_FCHMOD\${ac_dB}NEED_FCHMOD\${ac_dC}1\${ac_dD}
  1039. \${ac_uA}NEED_FCHMOD\${ac_uB}NEED_FCHMOD\${ac_uC}1\${ac_uD}
  1040. \${ac_eA}NEED_FCHMOD\${ac_eB}NEED_FCHMOD\${ac_eC}1\${ac_eD}
  1041. "
  1042. }
  1043.  
  1044. fi
  1045. rm -f conftest*
  1046.  
  1047. test -n "$silent" || echo "checking for strerror"
  1048. cat > conftest.${ac_ext} <<EOF
  1049. #include "confdefs.h"
  1050. #include <ctype.h>
  1051. int main() { return 0; }
  1052. int t() { 
  1053. /* The GNU C library defines this for functions which it implements
  1054.     to always fail with ENOSYS.  Some functions are actually named
  1055.     something starting with __ and the normal name is an alias.  */
  1056. #if defined (__stub_strerror) || defined (__stub___strerror)
  1057. choke me
  1058. #else
  1059. /* Override any gcc2 internal prototype to avoid an error.  */
  1060. extern char strerror(); strerror();
  1061. #endif
  1062. ; return 0; }
  1063. EOF
  1064. if eval $ac_compile; then
  1065.   :
  1066. else
  1067.   rm -rf conftest*
  1068.   {
  1069. test -n "$verbose" && \
  1070. echo "    defining NEED_STRERROR"
  1071. echo "#define" NEED_STRERROR "1" >> confdefs.h
  1072. DEFS="$DEFS -DNEED_STRERROR=1"
  1073. ac_sed_defs="${ac_sed_defs}\${ac_dA}NEED_STRERROR\${ac_dB}NEED_STRERROR\${ac_dC}1\${ac_dD}
  1074. \${ac_uA}NEED_STRERROR\${ac_uB}NEED_STRERROR\${ac_uC}1\${ac_uD}
  1075. \${ac_eA}NEED_STRERROR\${ac_eB}NEED_STRERROR\${ac_eC}1\${ac_eD}
  1076. "
  1077. }
  1078.  
  1079. fi
  1080. rm -f conftest*
  1081.  
  1082. test -n "$silent" || echo "checking for ANSI C header files"
  1083. cat > conftest.${ac_ext} <<EOF
  1084. #include "confdefs.h"
  1085. #include <stdlib.h>
  1086. #include <stdarg.h>
  1087. #include <string.h>
  1088. #include <float.h>
  1089. EOF
  1090. # Some shells (Coherent) do redirections in the wrong order, so need
  1091. # the parens.
  1092. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1093. if test -z "$ac_err"; then
  1094.   rm -rf conftest*
  1095.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1096. echo '#include "confdefs.h"
  1097. #include <string.h>' > conftest.${ac_ext}
  1098. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1099. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  1100.   rm -rf conftest*
  1101.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1102. cat > conftest.${ac_ext} <<EOF
  1103. #include "confdefs.h"
  1104. #include <ctype.h>
  1105. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1106. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1107. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  1108. int main () { int i; for (i = 0; i < 256; i++)
  1109. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1110. exit (0); }
  1111.  
  1112. EOF
  1113. eval $ac_compile
  1114. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1115.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1116. echo '#include "confdefs.h"
  1117. #include <stdlib.h>' > conftest.${ac_ext}
  1118. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1119. if egrep "free" conftest.out >/dev/null 2>&1; then
  1120.   rm -rf conftest*
  1121.   
  1122. {
  1123. test -n "$verbose" && \
  1124. echo "    defining STDC_HEADERS"
  1125. echo "#define" STDC_HEADERS "1" >> confdefs.h
  1126. DEFS="$DEFS -DSTDC_HEADERS=1"
  1127. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  1128. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  1129. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  1130. "
  1131. }
  1132.  
  1133.  
  1134. fi
  1135. rm -f conftest*
  1136.  
  1137.  
  1138. fi
  1139. rm -fr conftest*
  1140.  
  1141. fi
  1142. rm -f conftest*
  1143.  
  1144.  
  1145. fi
  1146. rm -f conftest*
  1147.  
  1148. test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
  1149. cat > conftest.${ac_ext} <<EOF
  1150. #include "confdefs.h"
  1151. #include <sys/types.h>
  1152. #include <sys/time.h>
  1153. #include <time.h>
  1154. int main() { return 0; }
  1155. int t() { struct tm *tp;; return 0; }
  1156. EOF
  1157. if eval $ac_compile; then
  1158.   rm -rf conftest*
  1159.   
  1160. {
  1161. test -n "$verbose" && \
  1162. echo "    defining TIME_WITH_SYS_TIME"
  1163. echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
  1164. DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
  1165. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  1166. \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  1167. \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  1168. "
  1169. }
  1170.  
  1171.  
  1172. fi
  1173. rm -f conftest*
  1174.  
  1175. test -n "$silent" || echo "checking for directory library header"
  1176. ac_dir_header=
  1177. if test -z "$ac_dir_header"; then
  1178.   test -n "$silent" || echo "checking for dirent.h"
  1179. cat > conftest.${ac_ext} <<EOF
  1180. #include "confdefs.h"
  1181. #include <sys/types.h>
  1182. #include <dirent.h>
  1183. int main() { return 0; }
  1184. int t() { DIR *dirp = 0;; return 0; }
  1185. EOF
  1186. if eval $ac_compile; then
  1187.   rm -rf conftest*
  1188.   
  1189. {
  1190. test -n "$verbose" && \
  1191. echo "    defining DIRENT"
  1192. echo "#define" DIRENT "1" >> confdefs.h
  1193. DEFS="$DEFS -DDIRENT=1"
  1194. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  1195. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  1196. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  1197. "
  1198. }
  1199.  ac_dir_header=dirent.h
  1200.  
  1201. fi
  1202. rm -f conftest*
  1203. fi
  1204. if test -z "$ac_dir_header"; then
  1205.   test -n "$silent" || echo "checking for sys/ndir.h"
  1206. cat > conftest.${ac_ext} <<EOF
  1207. #include "confdefs.h"
  1208. #include <sys/types.h>
  1209. #include <sys/ndir.h>
  1210. int main() { return 0; }
  1211. int t() { DIR *dirp = 0;; return 0; }
  1212. EOF
  1213. if eval $ac_compile; then
  1214.   rm -rf conftest*
  1215.   
  1216. {
  1217. test -n "$verbose" && \
  1218. echo "    defining SYSNDIR"
  1219. echo "#define" SYSNDIR "1" >> confdefs.h
  1220. DEFS="$DEFS -DSYSNDIR=1"
  1221. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  1222. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  1223. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  1224. "
  1225. }
  1226.  ac_dir_header=sys/ndir.h
  1227.  
  1228. fi
  1229. rm -f conftest*
  1230. fi
  1231. if test -z "$ac_dir_header"; then
  1232.   test -n "$silent" || echo "checking for sys/dir.h"
  1233. cat > conftest.${ac_ext} <<EOF
  1234. #include "confdefs.h"
  1235. #include <sys/types.h>
  1236. #include <sys/dir.h>
  1237. int main() { return 0; }
  1238. int t() { DIR *dirp = 0;; return 0; }
  1239. EOF
  1240. if eval $ac_compile; then
  1241.   rm -rf conftest*
  1242.   
  1243. {
  1244. test -n "$verbose" && \
  1245. echo "    defining SYSDIR"
  1246. echo "#define" SYSDIR "1" >> confdefs.h
  1247. DEFS="$DEFS -DSYSDIR=1"
  1248. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  1249. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  1250. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  1251. "
  1252. }
  1253.  ac_dir_header=sys/dir.h
  1254.  
  1255. fi
  1256. rm -f conftest*
  1257. fi
  1258. if test -z "$ac_dir_header"; then
  1259.   test -n "$silent" || echo "checking for ndir.h"
  1260. cat > conftest.${ac_ext} <<EOF
  1261. #include "confdefs.h"
  1262. #include <sys/types.h>
  1263. #include <ndir.h>
  1264. int main() { return 0; }
  1265. int t() { DIR *dirp = 0;; return 0; }
  1266. EOF
  1267. if eval $ac_compile; then
  1268.   rm -rf conftest*
  1269.   
  1270. {
  1271. test -n "$verbose" && \
  1272. echo "    defining NDIR"
  1273. echo "#define" NDIR "1" >> confdefs.h
  1274. DEFS="$DEFS -DNDIR=1"
  1275. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  1276. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  1277. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  1278. "
  1279. }
  1280.  ac_dir_header=ndir.h
  1281.  
  1282. fi
  1283. rm -f conftest*
  1284. fi
  1285.  
  1286. test -n "$silent" || echo "checking for closedir return value"
  1287. cat > conftest.${ac_ext} <<EOF
  1288. #include "confdefs.h"
  1289. #include <sys/types.h>
  1290. #include <$ac_dir_header>
  1291. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1292. EOF
  1293. eval $ac_compile
  1294. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1295.   :
  1296. else
  1297.   
  1298. {
  1299. test -n "$verbose" && \
  1300. echo "    defining VOID_CLOSEDIR"
  1301. echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  1302. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  1303. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  1304. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  1305. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  1306. "
  1307. }
  1308.  
  1309. fi
  1310. rm -fr conftest*
  1311.  
  1312. test -n "$silent" || echo "checking for return type of signal handlers"
  1313. cat > conftest.${ac_ext} <<EOF
  1314. #include "confdefs.h"
  1315. #include <sys/types.h>
  1316. #include <signal.h>
  1317. #ifdef signal
  1318. #undef signal
  1319. #endif
  1320. extern void (*signal ()) ();
  1321. int main() { return 0; }
  1322. int t() { int i;; return 0; }
  1323. EOF
  1324. if eval $ac_compile; then
  1325.   rm -rf conftest*
  1326.   
  1327. {
  1328. test -n "$verbose" && \
  1329. echo "    defining" RETSIGTYPE to be "void"
  1330. echo "#define" RETSIGTYPE "void" >> confdefs.h
  1331. DEFS="$DEFS -DRETSIGTYPE=void"
  1332. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  1333. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  1334. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  1335. "
  1336. }
  1337.  
  1338.  
  1339. else
  1340.   rm -rf conftest*
  1341.   
  1342. {
  1343. test -n "$verbose" && \
  1344. echo "    defining" RETSIGTYPE to be "int"
  1345. echo "#define" RETSIGTYPE "int" >> confdefs.h
  1346. DEFS="$DEFS -DRETSIGTYPE=int"
  1347. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  1348. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  1349. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  1350. "
  1351. }
  1352.  
  1353. fi
  1354. rm -f conftest*
  1355.  
  1356.  
  1357. test -n "$silent" || echo "checking for mode_t in sys/types.h"
  1358. echo '#include "confdefs.h"
  1359. #include <sys/types.h>' > conftest.${ac_ext}
  1360. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1361. if egrep "mode_t" conftest.out >/dev/null 2>&1; then
  1362.   :
  1363. else
  1364.   rm -rf conftest*
  1365.   
  1366. {
  1367. test -n "$verbose" && \
  1368. echo "    defining" mode_t to be "int"
  1369. echo "#define" mode_t "int" >> confdefs.h
  1370. DEFS="$DEFS -Dmode_t=int"
  1371. ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD}
  1372. \${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD}
  1373. \${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD}
  1374. "
  1375. }
  1376.  
  1377. fi
  1378. rm -f conftest*
  1379.  
  1380. test -n "$silent" || echo "checking for pid_t in sys/types.h"
  1381. echo '#include "confdefs.h"
  1382. #include <sys/types.h>' > conftest.${ac_ext}
  1383. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1384. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  1385.   :
  1386. else
  1387.   rm -rf conftest*
  1388.   
  1389. {
  1390. test -n "$verbose" && \
  1391. echo "    defining" pid_t to be "int"
  1392. echo "#define" pid_t "int" >> confdefs.h
  1393. DEFS="$DEFS -Dpid_t=int"
  1394. ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
  1395. \${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
  1396. \${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
  1397. "
  1398. }
  1399.  
  1400. fi
  1401. rm -f conftest*
  1402.  
  1403. test -n "$silent" || echo "checking for size_t in sys/types.h"
  1404. echo '#include "confdefs.h"
  1405. #include <sys/types.h>' > conftest.${ac_ext}
  1406. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1407. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  1408.   :
  1409. else
  1410.   rm -rf conftest*
  1411.   
  1412. {
  1413. test -n "$verbose" && \
  1414. echo "    defining" size_t to be "unsigned"
  1415. echo "#define" size_t "unsigned" >> confdefs.h
  1416. DEFS="$DEFS -Dsize_t=unsigned"
  1417. ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
  1418. \${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
  1419. \${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
  1420. "
  1421. }
  1422.  
  1423. fi
  1424. rm -f conftest*
  1425.  
  1426. test -n "$silent" || echo "checking for uid_t in sys/types.h"
  1427. echo '#include "confdefs.h"
  1428. #include <sys/types.h>' > conftest.${ac_ext}
  1429. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1430. if egrep "uid_t" conftest.out >/dev/null 2>&1; then
  1431.   :
  1432. else
  1433.   rm -rf conftest*
  1434.   
  1435. {
  1436. test -n "$verbose" && \
  1437. echo "    defining" uid_t to be "int"
  1438. echo "#define" uid_t "int" >> confdefs.h
  1439. DEFS="$DEFS -Duid_t=int"
  1440. ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
  1441. \${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
  1442. \${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
  1443. "
  1444. }
  1445.  
  1446. {
  1447. test -n "$verbose" && \
  1448. echo "    defining" gid_t to be "int"
  1449. echo "#define" gid_t "int" >> confdefs.h
  1450. DEFS="$DEFS -Dgid_t=int"
  1451. ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
  1452. \${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
  1453. \${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
  1454. "
  1455. }
  1456.  
  1457. fi
  1458. rm -f conftest*
  1459.  
  1460.  
  1461. case $DEFS in
  1462.   *HAVE_SYS_TWG_CONFIG*)  
  1463. {
  1464. test -n "$verbose" && \
  1465. echo "    defining WINS"
  1466. echo "#define" WINS "1" >> confdefs.h
  1467. DEFS="$DEFS -DWINS=1"
  1468. ac_sed_defs="${ac_sed_defs}\${ac_dA}WINS\${ac_dB}WINS\${ac_dC}1\${ac_dD}
  1469. \${ac_uA}WINS\${ac_uB}WINS\${ac_uC}1\${ac_uD}
  1470. \${ac_eA}WINS\${ac_eB}WINS\${ac_eC}1\${ac_eD}
  1471. "
  1472. }
  1473.  
  1474.     ;;
  1475. esac
  1476.  
  1477.  
  1478. echo checking for hpux version
  1479. if test -f /hp-ux; then
  1480.   hpux=1
  1481.   uname=`uname -r` 2> /dev/null
  1482.   case $uname in
  1483.     A.09* | A.9* | a.9* | a.09* | 9* | 09*)
  1484.         ;;
  1485.     A.08* | A.8* | a.8* | a.08* | 8* | 08*)
  1486.         
  1487. {
  1488. test -n "$verbose" && \
  1489. echo "    defining HPUX8"
  1490. echo "#define" HPUX8 "1" >> confdefs.h
  1491. DEFS="$DEFS -DHPUX8=1"
  1492. ac_sed_defs="${ac_sed_defs}\${ac_dA}HPUX8\${ac_dB}HPUX8\${ac_dC}1\${ac_dD}
  1493. \${ac_uA}HPUX8\${ac_uB}HPUX8\${ac_uC}1\${ac_uD}
  1494. \${ac_eA}HPUX8\${ac_eB}HPUX8\${ac_eC}1\${ac_eD}
  1495. "
  1496. }
  1497.  
  1498.         ;;
  1499.     A.07* | A.B7* | A.7* | a.7* | a.07* | 7* | 07*)
  1500.         
  1501. {
  1502. test -n "$verbose" && \
  1503. echo "    defining HPUX7"
  1504. echo "#define" HPUX7 "1" >> confdefs.h
  1505. DEFS="$DEFS -DHPUX7=1"
  1506. ac_sed_defs="${ac_sed_defs}\${ac_dA}HPUX7\${ac_dB}HPUX7\${ac_dC}1\${ac_dD}
  1507. \${ac_uA}HPUX7\${ac_uB}HPUX7\${ac_uC}1\${ac_uD}
  1508. \${ac_eA}HPUX7\${ac_eB}HPUX7\${ac_eC}1\${ac_eD}
  1509. "
  1510. }
  1511.  
  1512.         ;;
  1513.     *)
  1514.         
  1515. {
  1516. test -n "$verbose" && \
  1517. echo "    defining HPUXUNKNOWN"
  1518. echo "#define" HPUXUNKNOWN "1" >> confdefs.h
  1519. DEFS="$DEFS -DHPUXUNKNOWN=1"
  1520. ac_sed_defs="${ac_sed_defs}\${ac_dA}HPUXUNKNOWN\${ac_dB}HPUXUNKNOWN\${ac_dC}1\${ac_dD}
  1521. \${ac_uA}HPUXUNKNOWN\${ac_uB}HPUXUNKNOWN\${ac_uC}1\${ac_uD}
  1522. \${ac_eA}HPUXUNKNOWN\${ac_eB}HPUXUNKNOWN\${ac_eC}1\${ac_eD}
  1523. "
  1524. }
  1525.  
  1526.         ;;
  1527.   esac
  1528. fi
  1529.  
  1530.  
  1531. echo checking for NeXT
  1532. cat > conftest.${ac_ext} <<EOF
  1533. #include "confdefs.h"
  1534. #if defined(NeXT) || defined(__NeXT) || defined(__NeXT__)
  1535.   yes
  1536. #endif
  1537.  
  1538. EOF
  1539. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1540. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1541.   rm -rf conftest*
  1542.   nextstep=1
  1543.  
  1544. fi
  1545. rm -f conftest*
  1546.  
  1547.  
  1548. if test -n "$nextstep"; then
  1549.   if test "$CC" != "gcc"; then
  1550.     CC="cc -bsd"
  1551.   fi
  1552. fi
  1553.  
  1554.  
  1555. echo checking for Ultrix
  1556. cat > conftest.${ac_ext} <<EOF
  1557. #include "confdefs.h"
  1558. #if defined(ultrix) || defined(__ultrix) || defined(__ultrix)
  1559.   yes
  1560. #endif
  1561.  
  1562. EOF
  1563. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1564. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1565.   rm -rf conftest*
  1566.   ULTRIX=1
  1567.  
  1568. fi
  1569. rm -f conftest*
  1570.  
  1571.  
  1572. if test -n "$ULTRIX"; then
  1573.   test -z "$GCC" && CC="$CC -YBSD"
  1574. else
  1575.   # POSIX termios is broken on Ultrix so don't look for it.
  1576. echo checking for POSIX.1
  1577. cat > conftest.${ac_ext} <<EOF
  1578. #include "confdefs.h"
  1579. #include <sys/types.h>
  1580. #include <unistd.h>
  1581. main () {
  1582. #ifdef _POSIX_VERSION
  1583.   yes
  1584. #endif
  1585. }
  1586.  
  1587. EOF
  1588. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1589. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1590.   rm -rf conftest*
  1591.   
  1592. {
  1593. test -n "$verbose" && \
  1594. echo "    defining POSIX"
  1595. echo "#define" POSIX "1" >> confdefs.h
  1596. DEFS="$DEFS -DPOSIX=1"
  1597. ac_sed_defs="${ac_sed_defs}\${ac_dA}POSIX\${ac_dB}POSIX\${ac_dC}1\${ac_dD}
  1598. \${ac_uA}POSIX\${ac_uB}POSIX\${ac_uC}1\${ac_uD}
  1599. \${ac_eA}POSIX\${ac_eB}POSIX\${ac_eC}1\${ac_eD}
  1600. "
  1601. }
  1602.  posix=1
  1603.  
  1604. fi
  1605. rm -f conftest*
  1606.  
  1607. fi
  1608.  
  1609.  
  1610. echo checking for sequent/ptx
  1611. cat > conftest.${ac_ext} <<EOF
  1612. #include "confdefs.h"
  1613. #ifdef _SEQUENT_
  1614.   yes
  1615. #endif
  1616.  
  1617. EOF
  1618. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1619. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1620.   rm -rf conftest*
  1621.   LIBS="$LIBS -lseq";seqptx=1
  1622.  
  1623. fi
  1624. rm -f conftest*
  1625.  
  1626.  
  1627.  
  1628. echo checking for struct linger
  1629. echo '#include "confdefs.h"
  1630. #include <sys/socket.h>' > conftest.${ac_ext}
  1631. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1632. if egrep "struct( |    )*linger" conftest.out >/dev/null 2>&1; then
  1633.   :
  1634. else
  1635.   rm -rf conftest*
  1636.   
  1637. {
  1638. test -n "$verbose" && \
  1639. echo "    defining NO_STRUCT_LINGER"
  1640. echo "#define" NO_STRUCT_LINGER "1" >> confdefs.h
  1641. DEFS="$DEFS -DNO_STRUCT_LINGER=1"
  1642. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_STRUCT_LINGER\${ac_dB}NO_STRUCT_LINGER\${ac_dC}1\${ac_dD}
  1643. \${ac_uA}NO_STRUCT_LINGER\${ac_uB}NO_STRUCT_LINGER\${ac_uC}1\${ac_uD}
  1644. \${ac_eA}NO_STRUCT_LINGER\${ac_eB}NO_STRUCT_LINGER\${ac_eC}1\${ac_eD}
  1645. "
  1646. }
  1647.  
  1648. fi
  1649. rm -f conftest*
  1650.  
  1651.  
  1652.  
  1653. case "$DEFS" in
  1654.   *-DHAVE_GETSID* | *-DHAVE_GETPGID* )            ;;
  1655.   *)                            echo checking if getpgrp\(\) takes an argument
  1656.     cat > conftest.${ac_ext} <<EOF
  1657. #include "confdefs.h"
  1658.  
  1659. main()
  1660. {
  1661.   int pid;
  1662.   int pgid;
  1663.  
  1664.   pid = fork();
  1665.  
  1666.   if (0 == pid)
  1667.   {
  1668. #ifdef HAVE_SETSID
  1669.     setsid();
  1670. #else
  1671.     setpgrp(0, getpid());
  1672. #endif /* HAVE_SETSID */
  1673.     sleep(10);
  1674.   }
  1675.   else
  1676.   {
  1677.     sleep(2);
  1678.     pgid = getpgrp(pid);
  1679.     kill(pid,9);
  1680.     if (pid != pgid)
  1681.       exit(1);
  1682.   }
  1683.   exit(0);
  1684. }
  1685.  
  1686. EOF
  1687. eval $ac_compile
  1688. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1689.   :
  1690. else
  1691.   echo your getpgrp\(\) is painful;
  1692. {
  1693. test -n "$verbose" && \
  1694. echo "    defining BROKEN_GETPGRP"
  1695. echo "#define" BROKEN_GETPGRP "1" >> confdefs.h
  1696. DEFS="$DEFS -DBROKEN_GETPGRP=1"
  1697. ac_sed_defs="${ac_sed_defs}\${ac_dA}BROKEN_GETPGRP\${ac_dB}BROKEN_GETPGRP\${ac_dC}1\${ac_dD}
  1698. \${ac_uA}BROKEN_GETPGRP\${ac_uB}BROKEN_GETPGRP\${ac_uC}1\${ac_uD}
  1699. \${ac_eA}BROKEN_GETPGRP\${ac_eB}BROKEN_GETPGRP\${ac_eC}1\${ac_eD}
  1700. "
  1701. }
  1702.  
  1703. fi
  1704. rm -fr conftest*
  1705.     ;;
  1706. esac
  1707.  
  1708.  
  1709. if test x$posix != x1
  1710. then
  1711. test -n "$silent" || echo "checking for union wait"
  1712. cat > conftest.${ac_ext} <<EOF
  1713. #include "confdefs.h"
  1714. #include <sys/types.h>
  1715. #include <sys/wait.h>
  1716.  
  1717. int main() { return 0; }
  1718. int t() { 
  1719.   union wait x;
  1720.   int y;
  1721. #ifdef WEXITSTATUS
  1722.   y = WEXITSTATUS(x);
  1723. #endif
  1724. ; return 0; }
  1725. EOF
  1726. if eval $ac_compile; then
  1727.   rm -rf conftest*
  1728.   
  1729. {
  1730. test -n "$verbose" && \
  1731. echo "    defining BSDWAIT"
  1732. echo "#define" BSDWAIT "1" >> confdefs.h
  1733. DEFS="$DEFS -DBSDWAIT=1"
  1734. ac_sed_defs="${ac_sed_defs}\${ac_dA}BSDWAIT\${ac_dB}BSDWAIT\${ac_dC}1\${ac_dD}
  1735. \${ac_uA}BSDWAIT\${ac_uB}BSDWAIT\${ac_uC}1\${ac_uD}
  1736. \${ac_eA}BSDWAIT\${ac_eB}BSDWAIT\${ac_eC}1\${ac_eD}
  1737. "
  1738. }
  1739.  
  1740.  
  1741. else
  1742.   rm -rf conftest*
  1743.   test -n "$silent" || echo "checking for waitpid"
  1744. cat > conftest.${ac_ext} <<EOF
  1745. #include "confdefs.h"
  1746. #include <ctype.h>
  1747. int main() { return 0; }
  1748. int t() { 
  1749. /* The GNU C library defines this for functions which it implements
  1750.     to always fail with ENOSYS.  Some functions are actually named
  1751.     something starting with __ and the normal name is an alias.  */
  1752. #if defined (__stub_waitpid) || defined (__stub___waitpid)
  1753. choke me
  1754. #else
  1755. /* Override any gcc2 internal prototype to avoid an error.  */
  1756. extern char waitpid(); waitpid();
  1757. #endif
  1758. ; return 0; }
  1759. EOF
  1760. if eval $ac_compile; then
  1761.   :
  1762. else
  1763.   rm -rf conftest*
  1764.   {
  1765. test -n "$verbose" && \
  1766. echo "    defining NEED_WAITPID"
  1767. echo "#define" NEED_WAITPID "1" >> confdefs.h
  1768. DEFS="$DEFS -DNEED_WAITPID=1"
  1769. ac_sed_defs="${ac_sed_defs}\${ac_dA}NEED_WAITPID\${ac_dB}NEED_WAITPID\${ac_dC}1\${ac_dD}
  1770. \${ac_uA}NEED_WAITPID\${ac_uB}NEED_WAITPID\${ac_uC}1\${ac_uD}
  1771. \${ac_eA}NEED_WAITPID\${ac_eB}NEED_WAITPID\${ac_eC}1\${ac_eD}
  1772. "
  1773. }
  1774.  
  1775. fi
  1776. rm -f conftest*
  1777.  
  1778. fi
  1779. rm -f conftest*
  1780.  
  1781. fi
  1782.  
  1783.  
  1784. oldlibs="$LIBS"
  1785. test -n "$silent" || echo "checking for select"
  1786. cat > conftest.${ac_ext} <<EOF
  1787. #include "confdefs.h"
  1788.  
  1789. int main() { return 0; }
  1790. int t() { select(0, 0, 0, 0, 0);; return 0; }
  1791. EOF
  1792. if eval $ac_compile; then
  1793.   :
  1794. else
  1795.   rm -rf conftest*
  1796.   LIBS="$oldlibs -lsocket"
  1797. test -n "$silent" || echo "checking for select with $LIBS"
  1798. cat > conftest.${ac_ext} <<EOF
  1799. #include "confdefs.h"
  1800.  
  1801. int main() { return 0; }
  1802. int t() { select(0, 0, 0, 0, 0);; return 0; }
  1803. EOF
  1804. if eval $ac_compile; then
  1805.   rm -rf conftest*
  1806.   libsocket=1
  1807.  
  1808. else
  1809.   rm -rf conftest*
  1810.   LIBS="$oldlibs -lnsl"
  1811. test -n "$silent" || echo "checking for select with $LIBS"
  1812. cat > conftest.${ac_ext} <<EOF
  1813. #include "confdefs.h"
  1814.  
  1815. int main() { return 0; }
  1816. int t() { select(0, 0, 0, 0, 0);; return 0; }
  1817. EOF
  1818. if eval $ac_compile; then
  1819.   rm -rf conftest*
  1820.   libnsl=1
  1821.  
  1822. else
  1823.   rm -rf conftest*
  1824.   LIBS="$oldlibs -linet"
  1825. test -n "$silent" || echo "checking for select with $LIBS"
  1826. cat > conftest.${ac_ext} <<EOF
  1827. #include "confdefs.h"
  1828.  
  1829. int main() { return 0; }
  1830. int t() { select(0, 0, 0, 0, 0);; return 0; }
  1831. EOF
  1832. if eval $ac_compile; then
  1833.   rm -rf conftest*
  1834.   libinet=1
  1835.  
  1836. else
  1837.   rm -rf conftest*
  1838.   LIBS="$oldlibs -lcposix"
  1839. test -n "$silent" || echo "checking for select with $LIBS"
  1840. cat > conftest.${ac_ext} <<EOF
  1841. #include "confdefs.h"
  1842.  
  1843. int main() { return 0; }
  1844. int t() { select(0, 0, 0, 0, 0);; return 0; }
  1845. EOF
  1846. if eval $ac_compile; then
  1847.   rm -rf conftest*
  1848.   libcposix=1
  1849.  
  1850. else
  1851.   rm -rf conftest*
  1852.   LIBS="$oldlibs -lnet -lnsl_s"
  1853. test -n "$silent" || echo "checking for select with $LIBS"
  1854. cat > conftest.${ac_ext} <<EOF
  1855. #include "confdefs.h"
  1856.  
  1857. int main() { return 0; }
  1858. int t() { select(0, 0, 0, 0, 0);; return 0; }
  1859. EOF
  1860. if eval $ac_compile; then
  1861.   rm -rf conftest*
  1862.   libnet=1;libnsl_s=1
  1863.  
  1864. else
  1865.   rm -rf conftest*
  1866.   LIBS=$oldlibs
  1867. echo "I can not find select!  You might need to help me"
  1868.  
  1869. fi
  1870. rm -f conftest*
  1871.  
  1872. fi
  1873. rm -f conftest*
  1874.  
  1875. fi
  1876. rm -f conftest*
  1877.  
  1878. fi
  1879. rm -f conftest*
  1880.  
  1881. fi
  1882. rm -f conftest*
  1883.  
  1884. fi
  1885. rm -f conftest*
  1886.  
  1887.  
  1888. if test x$hpux = x1 -o x$aix = x1
  1889. then
  1890.   LIBS="-lcurses $LIBS"
  1891.   
  1892. {
  1893. test -n "$verbose" && \
  1894. echo "    defining USING_CURSES"
  1895. echo "#define" USING_CURSES "1" >> confdefs.h
  1896. DEFS="$DEFS -DUSING_CURSES=1"
  1897. ac_sed_defs="${ac_sed_defs}\${ac_dA}USING_CURSES\${ac_dB}USING_CURSES\${ac_dC}1\${ac_dD}
  1898. \${ac_uA}USING_CURSES\${ac_uB}USING_CURSES\${ac_uC}1\${ac_uD}
  1899. \${ac_eA}USING_CURSES\${ac_eB}USING_CURSES\${ac_eC}1\${ac_eD}
  1900. "
  1901. }
  1902.  
  1903. else
  1904. echo searching for tgetent
  1905. olibs="$LIBS"
  1906.   LIBS="-ltermcap $olibs"
  1907.   test -n "$silent" || echo "checking for libtermcap"
  1908. cat > conftest.${ac_ext} <<EOF
  1909. #include "confdefs.h"
  1910.  
  1911. int main() { return 0; }
  1912. int t() { tgetent((char *)0, (char *)0);; return 0; }
  1913. EOF
  1914. if eval $ac_compile; then
  1915.   rm -rf conftest*
  1916.   
  1917. {
  1918. test -n "$verbose" && \
  1919. echo "    defining USING_TERMCAP"
  1920. echo "#define" USING_TERMCAP "1" >> confdefs.h
  1921. DEFS="$DEFS -DUSING_TERMCAP=1"
  1922. ac_sed_defs="${ac_sed_defs}\${ac_dA}USING_TERMCAP\${ac_dB}USING_TERMCAP\${ac_dC}1\${ac_dD}
  1923. \${ac_uA}USING_TERMCAP\${ac_uB}USING_TERMCAP\${ac_uC}1\${ac_uD}
  1924. \${ac_eA}USING_TERMCAP\${ac_eB}USING_TERMCAP\${ac_eC}1\${ac_eD}
  1925. "
  1926. }
  1927.  
  1928.  
  1929. else
  1930.   rm -rf conftest*
  1931.   LIBS="-ltermlib $olibs"
  1932.   test -n "$silent" || echo "checking for libtermlib"
  1933. cat > conftest.${ac_ext} <<EOF
  1934. #include "confdefs.h"
  1935.  
  1936. int main() { return 0; }
  1937. int t() { tgetent((char *)0, (char *)0);; return 0; }
  1938. EOF
  1939. if eval $ac_compile; then
  1940.   rm -rf conftest*
  1941.   
  1942. {
  1943. test -n "$verbose" && \
  1944. echo "    defining USING_TERMLIB"
  1945. echo "#define" USING_TERMLIB "1" >> confdefs.h
  1946. DEFS="$DEFS -DUSING_TERMLIB=1"
  1947. ac_sed_defs="${ac_sed_defs}\${ac_dA}USING_TERMLIB\${ac_dB}USING_TERMLIB\${ac_dC}1\${ac_dD}
  1948. \${ac_uA}USING_TERMLIB\${ac_uB}USING_TERMLIB\${ac_uC}1\${ac_uD}
  1949. \${ac_eA}USING_TERMLIB\${ac_eB}USING_TERMLIB\${ac_eC}1\${ac_eD}
  1950. "
  1951. }
  1952.  
  1953.  
  1954. else
  1955.   rm -rf conftest*
  1956.   LIBS="-lcurses $olibs"
  1957.   test -n "$silent" || echo "checking for libcurses"
  1958. cat > conftest.${ac_ext} <<EOF
  1959. #include "confdefs.h"
  1960.  
  1961. int main() { return 0; }
  1962. int t() { tgetent((char *)0, (char *)0);; return 0; }
  1963. EOF
  1964. if eval $ac_compile; then
  1965.   rm -rf conftest*
  1966.   
  1967. {
  1968. test -n "$verbose" && \
  1969. echo "    defining USING_CURSES"
  1970. echo "#define" USING_CURSES "1" >> confdefs.h
  1971. DEFS="$DEFS -DUSING_CURSES=1"
  1972. ac_sed_defs="${ac_sed_defs}\${ac_dA}USING_CURSES\${ac_dB}USING_CURSES\${ac_dC}1\${ac_dD}
  1973. \${ac_uA}USING_CURSES\${ac_uB}USING_CURSES\${ac_uC}1\${ac_uD}
  1974. \${ac_eA}USING_CURSES\${ac_eB}USING_CURSES\${ac_eC}1\${ac_eD}
  1975. "
  1976. }
  1977.  
  1978.  
  1979. else
  1980.   rm -rf conftest*
  1981.   LIBS="-lxtermcap $olibs"
  1982.   test -n "$silent" || echo "checking for libxtermcap"
  1983. cat > conftest.${ac_ext} <<EOF
  1984. #include "confdefs.h"
  1985.  
  1986. int main() { return 0; }
  1987. int t() { tgetent((char *)0, (char *)0);; return 0; }
  1988. EOF
  1989. if eval $ac_compile; then
  1990.   rm -rf conftest*
  1991.   
  1992. {
  1993. test -n "$verbose" && \
  1994. echo "    defining USING_XTERMCAP"
  1995. echo "#define" USING_XTERMCAP "1" >> confdefs.h
  1996. DEFS="$DEFS -DUSING_XTERMCAP=1"
  1997. ac_sed_defs="${ac_sed_defs}\${ac_dA}USING_XTERMCAP\${ac_dB}USING_XTERMCAP\${ac_dC}1\${ac_dD}
  1998. \${ac_uA}USING_XTERMCAP\${ac_uB}USING_XTERMCAP\${ac_uC}1\${ac_uD}
  1999. \${ac_eA}USING_XTERMCAP\${ac_eB}USING_XTERMCAP\${ac_eC}1\${ac_eD}
  2000. "
  2001. }
  2002.  
  2003.  
  2004. else
  2005.   rm -rf conftest*
  2006.   echo "no tgetent - no ircii";exit
  2007. fi
  2008. rm -f conftest*
  2009.  
  2010.  
  2011. fi
  2012. rm -f conftest*
  2013.  
  2014. fi
  2015. rm -f conftest*
  2016.  
  2017. fi
  2018. rm -f conftest*
  2019.  
  2020. fi
  2021.  
  2022.  
  2023. echo checking signal implimentation
  2024. test -n "$silent" || echo "checking for sigaction"
  2025. cat > conftest.${ac_ext} <<EOF
  2026. #include "confdefs.h"
  2027. #include <ctype.h>
  2028. int main() { return 0; }
  2029. int t() { 
  2030. /* The GNU C library defines this for functions which it implements
  2031.     to always fail with ENOSYS.  Some functions are actually named
  2032.     something starting with __ and the normal name is an alias.  */
  2033. #if defined (__stub_sigaction) || defined (__stub___sigaction)
  2034. choke me
  2035. #else
  2036. /* Override any gcc2 internal prototype to avoid an error.  */
  2037. extern char sigaction(); sigaction();
  2038. #endif
  2039. ; return 0; }
  2040. EOF
  2041. if eval $ac_compile; then
  2042.   rm -rf conftest*
  2043.   {
  2044. test -n "$verbose" && \
  2045. echo "    defining USE_SIGACTION"
  2046. echo "#define" USE_SIGACTION "1" >> confdefs.h
  2047. DEFS="$DEFS -DUSE_SIGACTION=1"
  2048. ac_sed_defs="${ac_sed_defs}\${ac_dA}USE_SIGACTION\${ac_dB}USE_SIGACTION\${ac_dC}1\${ac_dD}
  2049. \${ac_uA}USE_SIGACTION\${ac_uB}USE_SIGACTION\${ac_uC}1\${ac_uD}
  2050. \${ac_eA}USE_SIGACTION\${ac_eB}USE_SIGACTION\${ac_eC}1\${ac_eD}
  2051. "
  2052. }
  2053.  
  2054.  
  2055. else
  2056.   rm -rf conftest*
  2057.   test -n "$silent" || echo "checking for sigset"
  2058. cat > conftest.${ac_ext} <<EOF
  2059. #include "confdefs.h"
  2060. #include <ctype.h>
  2061. int main() { return 0; }
  2062. int t() { 
  2063. /* The GNU C library defines this for functions which it implements
  2064.     to always fail with ENOSYS.  Some functions are actually named
  2065.     something starting with __ and the normal name is an alias.  */
  2066. #if defined (__stub_sigset) || defined (__stub___sigset)
  2067. choke me
  2068. #else
  2069. /* Override any gcc2 internal prototype to avoid an error.  */
  2070. extern char sigset(); sigset();
  2071. #endif
  2072. ; return 0; }
  2073. EOF
  2074. if eval $ac_compile; then
  2075.   rm -rf conftest*
  2076.   {
  2077. test -n "$verbose" && \
  2078. echo "    defining USE_SIGSET"
  2079. echo "#define" USE_SIGSET "1" >> confdefs.h
  2080. DEFS="$DEFS -DUSE_SIGSET=1"
  2081. ac_sed_defs="${ac_sed_defs}\${ac_dA}USE_SIGSET\${ac_dB}USE_SIGSET\${ac_dC}1\${ac_dD}
  2082. \${ac_uA}USE_SIGSET\${ac_uB}USE_SIGSET\${ac_uC}1\${ac_uD}
  2083. \${ac_eA}USE_SIGSET\${ac_eB}USE_SIGSET\${ac_eC}1\${ac_eD}
  2084. "
  2085. }
  2086.  
  2087.  
  2088. else
  2089.   rm -rf conftest*
  2090.   echo checking for reliable signals
  2091. cat > conftest.${ac_ext} <<EOF
  2092. #include "confdefs.h"
  2093.  
  2094. #include <sys/types.h>
  2095. #include <signal.h>
  2096.  
  2097. #ifndef SIGCHLD
  2098. # define SIGCHLD SIGCLD
  2099. #endif
  2100. #ifdef USE_SIGSET
  2101. # define signal sigset
  2102. #endif
  2103.  
  2104. int got;
  2105.  
  2106. #ifdef SIGVOID
  2107. void
  2108. #endif
  2109. hand()
  2110. {
  2111.   got++;
  2112. }
  2113.  
  2114. main()
  2115. {
  2116.   (void)signal(SIGCHLD, hand);
  2117.   kill(getpid(), SIGCHLD);
  2118.   kill(getpid(), SIGCHLD);
  2119.   if (got < 2)
  2120.     exit(1);
  2121.   exit(0);
  2122. }
  2123.  
  2124. EOF
  2125. eval $ac_compile
  2126. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2127.   :
  2128. else
  2129.   
  2130. {
  2131. test -n "$verbose" && \
  2132. echo "    defining SYSVSIGNALS"
  2133. echo "#define" SYSVSIGNALS "1" >> confdefs.h
  2134. DEFS="$DEFS -DSYSVSIGNALS=1"
  2135. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSVSIGNALS\${ac_dB}SYSVSIGNALS\${ac_dC}1\${ac_dD}
  2136. \${ac_uA}SYSVSIGNALS\${ac_uB}SYSVSIGNALS\${ac_uC}1\${ac_uD}
  2137. \${ac_eA}SYSVSIGNALS\${ac_eB}SYSVSIGNALS\${ac_eC}1\${ac_eD}
  2138. "
  2139. }
  2140.  
  2141. fi
  2142. rm -fr conftest*
  2143.  
  2144. fi
  2145. rm -f conftest*
  2146.  
  2147. fi
  2148. rm -f conftest*
  2149.  
  2150.  
  2151. case "$DEFS" in
  2152.   *BSDWAIT*)
  2153. echo checking for wait3 declaration
  2154. cat > conftest.${ac_ext} <<EOF
  2155. #include "confdefs.h"
  2156. #include <sys/types.h>
  2157. #include <signal.h>
  2158. #include <sys/wait.h>
  2159.  
  2160. EOF
  2161. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2162. if egrep "wait3( |    |\()" conftest.out >/dev/null 2>&1; then
  2163.   rm -rf conftest*
  2164.   
  2165. {
  2166. test -n "$verbose" && \
  2167. echo "    defining WAIT3_DECLARED"
  2168. echo "#define" WAIT3_DECLARED "1" >> confdefs.h
  2169. DEFS="$DEFS -DWAIT3_DECLARED=1"
  2170. ac_sed_defs="${ac_sed_defs}\${ac_dA}WAIT3_DECLARED\${ac_dB}WAIT3_DECLARED\${ac_dC}1\${ac_dD}
  2171. \${ac_uA}WAIT3_DECLARED\${ac_uB}WAIT3_DECLARED\${ac_uC}1\${ac_uD}
  2172. \${ac_eA}WAIT3_DECLARED\${ac_eB}WAIT3_DECLARED\${ac_eC}1\${ac_eD}
  2173. "
  2174. }
  2175.  
  2176.  
  2177. fi
  2178. rm -f conftest*
  2179.  
  2180.   ;;
  2181.   *)
  2182. echo checking for waitpid declaration
  2183. cat > conftest.${ac_ext} <<EOF
  2184. #include "confdefs.h"
  2185. #include <sys/types.h>
  2186. #include <signal.h>
  2187. #include <sys/wait.h>
  2188.  
  2189. EOF
  2190. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2191. if egrep "waitpid( |    |\()" conftest.out >/dev/null 2>&1; then
  2192.   rm -rf conftest*
  2193.   
  2194. {
  2195. test -n "$verbose" && \
  2196. echo "    defining WAITPID_DECLARED"
  2197. echo "#define" WAITPID_DECLARED "1" >> confdefs.h
  2198. DEFS="$DEFS -DWAITPID_DECLARED=1"
  2199. ac_sed_defs="${ac_sed_defs}\${ac_dA}WAITPID_DECLARED\${ac_dB}WAITPID_DECLARED\${ac_dC}1\${ac_dD}
  2200. \${ac_uA}WAITPID_DECLARED\${ac_uB}WAITPID_DECLARED\${ac_uC}1\${ac_uD}
  2201. \${ac_eA}WAITPID_DECLARED\${ac_eB}WAITPID_DECLARED\${ac_eC}1\${ac_eD}
  2202. "
  2203. }
  2204.  
  2205.  
  2206. fi
  2207. rm -f conftest*
  2208.  
  2209.   ;;
  2210. esac
  2211.  
  2212.  
  2213. echo checking for sys_errlist declaration
  2214. cat > conftest.${ac_ext} <<EOF
  2215. #include "confdefs.h"
  2216.  
  2217. #include <sys/types.h>
  2218. #include <stdio.h>
  2219. #include <errno.h>
  2220. main()
  2221. {
  2222.   char *s = sys_errlist[0];
  2223.   exit(0);
  2224. }
  2225.  
  2226. EOF
  2227. eval $ac_compile
  2228. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2229.   
  2230. {
  2231. test -n "$verbose" && \
  2232. echo "    defining SYS_ERRLIST_DECLARED"
  2233. echo "#define" SYS_ERRLIST_DECLARED "1" >> confdefs.h
  2234. DEFS="$DEFS -DSYS_ERRLIST_DECLARED=1"
  2235. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_ERRLIST_DECLARED\${ac_dB}SYS_ERRLIST_DECLARED\${ac_dC}1\${ac_dD}
  2236. \${ac_uA}SYS_ERRLIST_DECLARED\${ac_uB}SYS_ERRLIST_DECLARED\${ac_uC}1\${ac_uD}
  2237. \${ac_eA}SYS_ERRLIST_DECLARED\${ac_eB}SYS_ERRLIST_DECLARED\${ac_eC}1\${ac_eD}
  2238. "
  2239. }
  2240.  
  2241.  
  2242. fi
  2243. rm -fr conftest*
  2244.  
  2245.  
  2246. echo checking for a 32 bit integer
  2247. cat > conftest.${ac_ext} <<EOF
  2248. #include "confdefs.h"
  2249.  
  2250. main()
  2251. {
  2252.   if (4 == sizeof(unsigned long))
  2253.     exit(0);
  2254.   exit(1);
  2255. }
  2256.  
  2257. EOF
  2258. eval $ac_compile
  2259. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2260.   
  2261. {
  2262. test -n "$verbose" && \
  2263. echo "    defining UNSIGNED_LONG32"
  2264. echo "#define" UNSIGNED_LONG32 "1" >> confdefs.h
  2265. DEFS="$DEFS -DUNSIGNED_LONG32=1"
  2266. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNSIGNED_LONG32\${ac_dB}UNSIGNED_LONG32\${ac_dC}1\${ac_dD}
  2267. \${ac_uA}UNSIGNED_LONG32\${ac_uB}UNSIGNED_LONG32\${ac_uC}1\${ac_uD}
  2268. \${ac_eA}UNSIGNED_LONG32\${ac_eB}UNSIGNED_LONG32\${ac_eC}1\${ac_eD}
  2269. "
  2270. }
  2271.  
  2272.  
  2273. else
  2274.   cat > conftest.${ac_ext} <<EOF
  2275. #include "confdefs.h"
  2276.  
  2277. main()
  2278. {
  2279.   if (4 == sizeof(unsigned int))
  2280.     exit(0);
  2281.   exit(1);
  2282. }
  2283.  
  2284. EOF
  2285. eval $ac_compile
  2286. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2287.   
  2288. {
  2289. test -n "$verbose" && \
  2290. echo "    defining UNSIGNED_INT32"
  2291. echo "#define" UNSIGNED_INT32 "1" >> confdefs.h
  2292. DEFS="$DEFS -DUNSIGNED_INT32=1"
  2293. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNSIGNED_INT32\${ac_dB}UNSIGNED_INT32\${ac_dC}1\${ac_dD}
  2294. \${ac_uA}UNSIGNED_INT32\${ac_uB}UNSIGNED_INT32\${ac_uC}1\${ac_uD}
  2295. \${ac_eA}UNSIGNED_INT32\${ac_eB}UNSIGNED_INT32\${ac_eC}1\${ac_eD}
  2296. "
  2297. }
  2298.  
  2299.  
  2300. else
  2301.   
  2302. {
  2303. test -n "$verbose" && \
  2304. echo "    defining UNKNOWN_32INT"
  2305. echo "#define" UNKNOWN_32INT "1" >> confdefs.h
  2306. DEFS="$DEFS -DUNKNOWN_32INT=1"
  2307. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNKNOWN_32INT\${ac_dB}UNKNOWN_32INT\${ac_dC}1\${ac_dD}
  2308. \${ac_uA}UNKNOWN_32INT\${ac_uB}UNKNOWN_32INT\${ac_uC}1\${ac_uD}
  2309. \${ac_eA}UNKNOWN_32INT\${ac_eB}UNKNOWN_32INT\${ac_eC}1\${ac_eD}
  2310. "
  2311. }
  2312.  
  2313. fi
  2314. rm -fr conftest*
  2315. fi
  2316. rm -fr conftest*
  2317.  
  2318.  
  2319. ac_save_LIBS="${LIBS}"
  2320. LIBS="${LIBS} -lelf"
  2321. ac_have_lib=""
  2322. test -n "$silent" || echo "checking for -lelf"
  2323. cat > conftest.${ac_ext} <<EOF
  2324. #include "confdefs.h"
  2325.  
  2326. int main() { return 0; }
  2327. int t() { main();; return 0; }
  2328. EOF
  2329. if eval $ac_compile; then
  2330.   rm -rf conftest*
  2331.   ac_have_lib="1"
  2332.  
  2333. fi
  2334. rm -f conftest*
  2335. LIBS="${ac_save_LIBS}"
  2336. if test -n "${ac_have_lib}"; then
  2337.    :; LIBS="$LIBS -lelf"
  2338. else
  2339.    :; 
  2340. fi
  2341.  
  2342. ac_save_LIBS="${LIBS}"
  2343. LIBS="${LIBS} -lnls"
  2344. ac_have_lib=""
  2345. test -n "$silent" || echo "checking for -lnls"
  2346. cat > conftest.${ac_ext} <<EOF
  2347. #include "confdefs.h"
  2348.  
  2349. int main() { return 0; }
  2350. int t() { main();; return 0; }
  2351. EOF
  2352. if eval $ac_compile; then
  2353.   rm -rf conftest*
  2354.   ac_have_lib="1"
  2355.  
  2356. fi
  2357. rm -f conftest*
  2358. LIBS="${ac_save_LIBS}"
  2359. if test -n "${ac_have_lib}"; then
  2360.    :; libnls=1;
  2361. {
  2362. test -n "$verbose" && \
  2363. echo "    defining HAVE_LIB_NLS"
  2364. echo "#define" HAVE_LIB_NLS "1" >> confdefs.h
  2365. DEFS="$DEFS -DHAVE_LIB_NLS=1"
  2366. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIB_NLS\${ac_dB}HAVE_LIB_NLS\${ac_dC}1\${ac_dD}
  2367. \${ac_uA}HAVE_LIB_NLS\${ac_uB}HAVE_LIB_NLS\${ac_uC}1\${ac_uD}
  2368. \${ac_eA}HAVE_LIB_NLS\${ac_eB}HAVE_LIB_NLS\${ac_eC}1\${ac_eD}
  2369. "
  2370. }
  2371.  
  2372. else
  2373.    :; 
  2374. fi
  2375.  
  2376. if test ! -n "$libsocket"; then
  2377.     ac_save_LIBS="${LIBS}"
  2378. LIBS="${LIBS} -lsocket"
  2379. ac_have_lib=""
  2380. test -n "$silent" || echo "checking for -lsocket"
  2381. cat > conftest.${ac_ext} <<EOF
  2382. #include "confdefs.h"
  2383.  
  2384. int main() { return 0; }
  2385. int t() { main();; return 0; }
  2386. EOF
  2387. if eval $ac_compile; then
  2388.   rm -rf conftest*
  2389.   ac_have_lib="1"
  2390.  
  2391. fi
  2392. rm -f conftest*
  2393. LIBS="${ac_save_LIBS}"
  2394. if test -n "${ac_have_lib}"; then
  2395.    :; LIBS="$LIBS -lsocket"
  2396. else
  2397.    :; 
  2398. fi
  2399.  
  2400. fi
  2401. if test ! -n "$libinet"; then
  2402.     ac_save_LIBS="${LIBS}"
  2403. LIBS="${LIBS} -linet"
  2404. ac_have_lib=""
  2405. test -n "$silent" || echo "checking for -linet"
  2406. cat > conftest.${ac_ext} <<EOF
  2407. #include "confdefs.h"
  2408.  
  2409. int main() { return 0; }
  2410. int t() { main();; return 0; }
  2411. EOF
  2412. if eval $ac_compile; then
  2413.   rm -rf conftest*
  2414.   ac_have_lib="1"
  2415.  
  2416. fi
  2417. rm -f conftest*
  2418. LIBS="${ac_save_LIBS}"
  2419. if test -n "${ac_have_lib}"; then
  2420.    :; LIBS="$LIBS -linet"
  2421. else
  2422.    :; 
  2423. fi
  2424.  
  2425. fi
  2426. if test ! -n "$libnsl"; then
  2427.     ac_save_LIBS="${LIBS}"
  2428. LIBS="${LIBS} -lnsl"
  2429. ac_have_lib=""
  2430. test -n "$silent" || echo "checking for -lnsl"
  2431. cat > conftest.${ac_ext} <<EOF
  2432. #include "confdefs.h"
  2433.  
  2434. int main() { return 0; }
  2435. int t() { main();; return 0; }
  2436. EOF
  2437. if eval $ac_compile; then
  2438.   rm -rf conftest*
  2439.   ac_have_lib="1"
  2440.  
  2441. fi
  2442. rm -f conftest*
  2443. LIBS="${ac_save_LIBS}"
  2444. if test -n "${ac_have_lib}"; then
  2445.    :; LIBS="$LIBS -lnsl"
  2446. else
  2447.    :; 
  2448. fi
  2449.  
  2450. fi
  2451. ac_save_LIBS="${LIBS}"
  2452. LIBS="${LIBS} -ldgc"
  2453. ac_have_lib=""
  2454. test -n "$silent" || echo "checking for -ldgc"
  2455. cat > conftest.${ac_ext} <<EOF
  2456. #include "confdefs.h"
  2457.  
  2458. int main() { return 0; }
  2459. int t() { main();; return 0; }
  2460. EOF
  2461. if eval $ac_compile; then
  2462.   rm -rf conftest*
  2463.   ac_have_lib="1"
  2464.  
  2465. fi
  2466. rm -f conftest*
  2467. LIBS="${ac_save_LIBS}"
  2468. if test -n "${ac_have_lib}"; then
  2469.    :; LIBS="$LIBS -ldgc"
  2470. else
  2471.    :; 
  2472. fi
  2473.  
  2474. ac_save_LIBS="${LIBS}"
  2475. LIBS="${LIBS} -lresolv"
  2476. ac_have_lib=""
  2477. test -n "$silent" || echo "checking for -lresolv"
  2478. cat > conftest.${ac_ext} <<EOF
  2479. #include "confdefs.h"
  2480.  
  2481. int main() { return 0; }
  2482. int t() { main();; return 0; }
  2483. EOF
  2484. if eval $ac_compile; then
  2485.   rm -rf conftest*
  2486.   ac_have_lib="1"
  2487.  
  2488. fi
  2489. rm -f conftest*
  2490. LIBS="${ac_save_LIBS}"
  2491. if test -n "${ac_have_lib}"; then
  2492.    :; olibs=$LIBS
  2493. LIBS="$LIBS -lresolv"
  2494. cat > conftest.${ac_ext} <<EOF
  2495. #include "confdefs.h"
  2496.  
  2497. #include <netdb.h>
  2498. main()
  2499. {
  2500.   struct hostent *hp;
  2501.  
  2502.   hp = gethostbyname("foo");
  2503.   exit(0);
  2504. }
  2505.  
  2506. EOF
  2507. eval $ac_compile
  2508. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2509.   :
  2510. else
  2511.   LIBS=$olibs
  2512. fi
  2513. rm -fr conftest*
  2514. else
  2515.    :; 
  2516. fi
  2517.  
  2518.  
  2519. echo "generating a list of signal names..."
  2520. set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
  2521. $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
  2522.   sig[$3] = substr($2,4,20)
  2523.   if (max < $3 && $3 < 60) {
  2524.     max = $3
  2525.   }
  2526. }
  2527.  
  2528. END {
  2529.   for (i=1; i<=max; i++) {
  2530.     if (sig[i] == "")
  2531.       printf "%d", i
  2532.     else
  2533.       printf "%s", sig[i]
  2534.     if (i < max)
  2535.       printf " "
  2536.   }
  2537.   printf "\n"
  2538. }
  2539. '`
  2540. shift
  2541. case $# in
  2542. 0)
  2543.   set X `kill -l 2> /dev/null`
  2544.   shift
  2545.   case $# in
  2546.   0) set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
  2547.     ;;
  2548.   esac
  2549.   ;;
  2550. esac
  2551. sig_name="ZERO $*"
  2552. if test -f source/sig.inc; then
  2553.   /bin/rm -f source/sig.inc
  2554. fi
  2555. echo $sig_name | sed -e 's/$/"};/' -e 's/ /", "/g' -e 's/^/char *signals[] = { "/' >> source/sig.inc
  2556.  
  2557.  
  2558. echo checking for unix mail directory
  2559.  
  2560. for foo in /var/spool/mail /usr/spool/mail /var/mail /usr/mail
  2561. do
  2562.   if test -d $foo; then
  2563.     mdir=$foo
  2564.     break
  2565.   fi
  2566. done
  2567.  
  2568. if test -n "$mdir"; then
  2569.   UNIX_MAIL=\"$mdir\"
  2570. else
  2571.   UNIX_MAIL=\"unknown\"
  2572. fi
  2573.  
  2574.  
  2575. {
  2576. test -n "$verbose" && \
  2577. echo "    defining" UNIX_MAIL to be "\"$mdir\""
  2578. echo "#define" UNIX_MAIL "\"$mdir\"" >> confdefs.h
  2579. DEFS="$DEFS -DUNIX_MAIL=\"$mdir\""
  2580. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNIX_MAIL\${ac_dB}UNIX_MAIL\${ac_dC}\"$mdir\"\${ac_dD}
  2581. \${ac_uA}UNIX_MAIL\${ac_uB}UNIX_MAIL\${ac_uC}\"$mdir\"\${ac_uD}
  2582. \${ac_eA}UNIX_MAIL\${ac_eB}UNIX_MAIL\${ac_eC}\"$mdir\"\${ac_eD}
  2583. "
  2584. }
  2585.  
  2586.  
  2587. if test -z "$CFLAGS"; then CFLAGS=-O ; fi
  2588. if test -z "$LDFLAGS"; then LDFLAGS= ; fi
  2589. RM="rm -f"
  2590. LN="ln -s"
  2591. if test ! -n "$bindir";
  2592. then
  2593.     bindir=\${exec_prefix}/bin
  2594. fi
  2595.  
  2596. if test ! -n "$IRCLIB";
  2597. then
  2598.     IRCLIB=\${prefix}/lib/irc
  2599. fi
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608. # The preferred way to propogate these variables is regular @ substitutions.
  2609. if test -n "$prefix"; then
  2610.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  2611. else
  2612.   prefix=/usr/local
  2613. fi
  2614. if test -n "$exec_prefix"; then
  2615.   ac_prsub="$ac_prsub
  2616. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  2617. else
  2618.   exec_prefix='${prefix}' # Let make expand it.
  2619. fi
  2620.  
  2621. # Any assignment to VPATH causes Sun make to only execute
  2622. # the first set of double-colon rules, so remove it if not needed.
  2623. # If there is a colon in the path, we need to keep it.
  2624. if test "x$srcdir" = x.; then
  2625.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2626. fi
  2627.  
  2628. # Quote sed substitution magic chars in DEFS.
  2629. cat >conftest.def <<EOF
  2630. $DEFS
  2631. EOF
  2632. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  2633. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  2634. rm -f conftest.def
  2635. # Substitute for predefined variables.
  2636.  
  2637. trap 'rm -f config.status; exit 1' 1 2 15
  2638. echo creating config.status
  2639. rm -f config.status
  2640. cat > config.status <<EOF
  2641. #!/bin/sh
  2642. # Generated automatically by configure.
  2643. # Run this file to recreate the current configuration.
  2644. # This directory was configured as follows,
  2645. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2646. #
  2647. # $0 $configure_args
  2648.  
  2649. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  2650. for ac_option
  2651. do
  2652.   case "\$ac_option" in
  2653.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2654.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  2655.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  2656.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2657.     echo "config.status generated by autoconf version 1.11"
  2658.     exit 0 ;;
  2659.   -help | --help | --hel | --he | --h)
  2660.     echo "\$ac_cs_usage"; exit 0 ;;
  2661.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2662.   esac
  2663. done
  2664.  
  2665. trap 'rm -fr Makefile source/Makefile include/defs.h conftest*; exit 1' 1 2 15
  2666. VERSION='$VERSION'
  2667. CC='$CC'
  2668. CPP='$CPP'
  2669. LEX='$LEX'
  2670. LEXLIB='$LEXLIB'
  2671. CFLAGS='$CFLAGS'
  2672. LDFLAGS='$LDFLAGS'
  2673. RM='$RM'
  2674. LN='$LN'
  2675. IRCLIB='$IRCLIB'
  2676. bindir='$bindir'
  2677. LIBS='$LIBS'
  2678. srcdir='$srcdir'
  2679. top_srcdir='$top_srcdir'
  2680. prefix='$prefix'
  2681. exec_prefix='$exec_prefix'
  2682. ac_prsub='$ac_prsub'
  2683. ac_vpsub='$ac_vpsub'
  2684. extrasub='$extrasub'
  2685. EOF
  2686. cat >> config.status <<\EOF
  2687.  
  2688. ac_given_srcdir=$srcdir
  2689.  
  2690. CONFIG_FILES=${CONFIG_FILES-"Makefile source/Makefile"}
  2691. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  2692.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2693.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2694.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2695.     # The file is in a subdirectory.
  2696.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2697.     ac_dir_suffix="/$ac_dir"
  2698.   else
  2699.     ac_dir_suffix=
  2700.   fi
  2701.  
  2702.   # A "../" for each directory in $ac_dir_suffix.
  2703.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2704.   case "$ac_given_srcdir" in
  2705.   .)  srcdir=.
  2706.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  2707.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2708.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2709.   *) # Relative path.
  2710.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2711.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2712.   esac
  2713.  
  2714.   echo creating "$ac_file"
  2715.   rm -f "$ac_file"
  2716.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  2717.   case "$ac_file" in
  2718.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  2719.     * )          echo "# $comment_str"     > "$ac_file" ;;
  2720.   esac
  2721.   sed -e "
  2722. $ac_prsub
  2723. $ac_vpsub
  2724. $extrasub
  2725. s%@VERSION@%$VERSION%g
  2726. s%@CC@%$CC%g
  2727. s%@CPP@%$CPP%g
  2728. s%@LEX@%$LEX%g
  2729. s%@LEXLIB@%$LEXLIB%g
  2730. s%@CFLAGS@%$CFLAGS%g
  2731. s%@LDFLAGS@%$LDFLAGS%g
  2732. s%@RM@%$RM%g
  2733. s%@LN@%$LN%g
  2734. s%@IRCLIB@%$IRCLIB%g
  2735. s%@bindir@%$bindir%g
  2736. s%@LIBS@%$LIBS%g
  2737. s%@srcdir@%$srcdir%g
  2738. s%@top_srcdir@%$top_srcdir%g
  2739. s%@prefix@%$prefix%g
  2740. s%@exec_prefix@%$exec_prefix%g
  2741. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  2742. fi; done
  2743.  
  2744. # These sed commands are put into ac_sed_defs when defining a macro.
  2745. # They are broken into pieces to make the sed script easier to manage.
  2746. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  2747. # is the cpp macro being defined and VALUE is the value it is being given.
  2748. # Each defining turns into a single global substitution command.
  2749. # Hopefully no one uses "!" as a variable value.
  2750. # Other candidates for the sed separators, like , and @, do get used.
  2751. #
  2752. # ac_d sets the value in "#define NAME VALUE" lines.
  2753. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2754. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  2755. ac_dC='\3'
  2756. ac_dD='!g'
  2757. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2758. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2759. ac_uB='\([     ]\)!\1#\2define\3'
  2760. ac_uC=' '
  2761. ac_uD='\4!g'
  2762. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2763. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2764. ac_eB='$!\1#\2define\3'
  2765. ac_eC=' '
  2766. ac_eD='!g'
  2767. rm -f conftest.sed
  2768. EOF
  2769. # Turn off quoting long enough to insert the sed commands.
  2770. rm -f conftest.sh
  2771. cat > conftest.sh <<EOF
  2772. $ac_sed_defs
  2773. EOF
  2774.  
  2775. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  2776. # on the size of here documents.
  2777.  
  2778. # Maximum number of lines to put in a single here document.
  2779. ac_max_sh_lines=9
  2780.  
  2781. while :
  2782. do
  2783.   # wc gives bogus results for an empty file on some AIX systems.
  2784.   ac_lines=`grep -c . conftest.sh`
  2785.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2786.   rm -f conftest.s1 conftest.s2
  2787.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  2788.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  2789.   # Write a limited-size here document to append to conftest.sed.
  2790.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  2791.   cat conftest.s1 >> config.status
  2792.   echo 'CONFEOF' >> config.status
  2793.   rm -f conftest.s1 conftest.sh
  2794.   mv conftest.s2 conftest.sh
  2795. done
  2796. rm -f conftest.sh
  2797.  
  2798. # Now back to your regularly scheduled config.status.
  2799. cat >> config.status <<\EOF
  2800. # This sed command replaces #undef's with comments.  This is necessary, for
  2801. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2802. # on some systems where configure will not decide to define it in
  2803. # include/defs.h.
  2804. cat >> conftest.sed <<\CONFEOF
  2805. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  2806. CONFEOF
  2807. rm -f conftest.h
  2808. # Break up the sed commands because old seds have small limits.
  2809. ac_max_sed_lines=20
  2810.  
  2811. CONFIG_HEADERS=${CONFIG_HEADERS-"include/defs.h"}
  2812. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  2813.   echo creating $ac_file
  2814.  
  2815.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  2816.   cp conftest.sed conftest.stm
  2817.   while :
  2818.   do
  2819.     ac_lines=`grep -c . conftest.stm`
  2820.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2821.     rm -f conftest.s1 conftest.s2 conftest.h2
  2822.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  2823.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  2824.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  2825.     rm -f conftest.s1 conftest.h1 conftest.stm
  2826.     mv conftest.h2 conftest.h1
  2827.     mv conftest.s2 conftest.stm
  2828.   done
  2829.   rm -f conftest.stm conftest.h
  2830.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2831.   cat conftest.h1 >> conftest.h
  2832.   rm -f conftest.h1
  2833.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2834.     # The file exists and we would not be changing it.
  2835.     echo "$ac_file is unchanged"
  2836.     rm -f conftest.h
  2837.   else
  2838.     rm -f $ac_file
  2839.     mv conftest.h $ac_file
  2840.   fi
  2841. fi; done
  2842. rm -f conftest.sed
  2843.  
  2844.  
  2845.  
  2846. exit 0
  2847. EOF
  2848. chmod +x config.status
  2849. # Some shells look in PATH for config.status without the "./".
  2850. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  2851.  
  2852.  
  2853. echo
  2854. echo well there we are, you now might want to look in include/config.h
  2855. echo and see if there is anything you might want to tune, else you can
  2856. echo just run a make here..  good luck!
  2857. echo
  2858.  
  2859.